CVE-2026-45753

Symfony: HtmlSanitizer UrlAttributeSanitizer Omits action/formaction/poster/cite — javascript: URI Survives Sanitization (XSS)

Published Jul 14, 2026 CVSS 4.0 · 2.1 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
First Time appeared Symfony
Symfony html-sanitizer
Symfony symfony
Vendors & Products Symfony
Symfony html-sanitizer
Symfony symfony
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 14, 2026, 6:39 PM
Reserved
May 13, 2026, 6:54 AM
Status
Analyzed
Published
Jul 14, 2026, 7:17 PM
Modified
Jul 15, 2026, 1:44 PM