Description
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 6.1.0-BETA1 until 6.4.40, 7.4.12, and 8.0.12, UrlAttributeSanitizer::getSupportedAttributes() omits URL-valued attributes including action, formaction, poster, and cite, so configurations that admit those attributes can leave javascript: URIs unsanitized and enable XSS when the resulting HTML is rendered or a victim submits a form or clicks a button. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.
Published: 2026-07-14
Score: 2.1 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability in Symfony’s HtmlSanitizer arises from the UrlAttributeSanitizer::getSupportedAttributes() method unintentionally excluding several URL‑valued attributes—action, formaction, poster, and cite—during sanitization. When applications running versions from 6.1.0‑BETA1 through 6.4.40, up to 7.4.12, and 8.0.12 let these attributes be used, javascript: URIs can pass through unfiltered. This allows an attacker to embed executable JavaScript that will run when the HTML is rendered, when a form is submitted, or when a user clicks a button, thereby enabling cross‑site scripting. The flaw is an input‑validation weakness and has been rated as CWE‑79 and CWE‑184. It is fixed in Symfony releases 6.4.40, 7.4.12, and 8.0.12.

Affected Systems

Affected are the Symfony PHP framework and its HtmlSanitizer component in version ranges from 6.1.0‑BETA1 up to 6.4.40, as well as the released 7.4.12 and 8.0.12 releases. Users running any of these versions should verify their installed version and assess whether the vulnerable attribute handling is enabled in their application.

Risk and Exploitability

The CVSS score of 2.1 reflects a low severity, and the EPSS score of less than 1 % indicates a very low likelihood of active exploitation. The flaw is not listed in the CISA KEV catalog. The most plausible attack vector is the injection of malicious content through form submissions or content that is processed by the HtmlSanitizer, allowing an attacker to embed a javascript: URI in an allowed attribute that then executes in the victim's browser.

Generated by OpenCVE AI on July 31, 2026 at 05:47 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Symfony to the patched releases 6.4.40, 7.4.12, or 8.0.12 (or later).
  • If an upgrade cannot be performed immediately, configure the application to disallow the action, formaction, poster, and cite attributes or strip them from the generated HTML before rendering.
  • Implement a custom sanitizer that rejects javascript: URIs for all remaining URL‑valued attributes to provide an additional defense line.

Generated by OpenCVE AI on July 31, 2026 at 05:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hhg7-c65m-h7ff Symfony's HtmlSanitizer UrlAttributeSanitizer Omits action/formaction/poster/cite — `javascript`: URI Survives Sanitization (XSS)
History

Tue, 14 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 18:45:00 +0000

Type Values Removed Values Added
Description Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 6.1.0-BETA1 until 6.4.40, 7.4.12, and 8.0.12, UrlAttributeSanitizer::getSupportedAttributes() omits URL-valued attributes including action, formaction, poster, and cite, so configurations that admit those attributes can leave javascript: URIs unsanitized and enable XSS when the resulting HTML is rendered or a victim submits a form or clicks a button. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.
Title Symfony: HtmlSanitizer UrlAttributeSanitizer Omits action/formaction/poster/cite — javascript: URI Survives Sanitization (XSS)
Weaknesses CWE-184
CWE-79
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-14T18:39:28.564Z

Reserved: 2026-05-13T06:54:34.221Z

Link: CVE-2026-45753

cve-icon Vulnrichment

Updated: 2026-07-14T18:39:25.651Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T06:00:16Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')