CVE-2026-48761: Symfony HtmlSanitizer UrlAttributeSanitizer Misses URL Attributes Vulnerability
MODERATECVE-2026-48761 is a MODERATE htmlsanitizer urlattributesanitizer misses url attributes vulnerability (CWE-1023: Incomplete Comparison with Missing Factors) affecting Symfony libraries in the Packagist ecosystem. The issue involves htmlsanitizer urlattributesanitizer misses url attributes. Remediation is available by upgrading affected packages to version 6.4.41, 7.4.13, 8.0.13.
CVE-2026-48761 at a Glance
How to Fix CVE-2026-48761
To remediate this vulnerability, upgrade all affected Symfony dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade symfony/html-sanitizer to 6.4.41
Upgrade symfony/html-sanitizer to 7.4.13
Upgrade symfony/html-sanitizer to 8.0.13
Upgrade symfony/symfony to 6.4.41
Upgrade symfony/symfony to 7.4.13
Upgrade symfony/symfony to 8.0.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/html-sanitizer
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-48761, inspect your project dependencies for Symfony:
inspect dependencies for symfony/html-sanitizer
Analyze the terminal output to locate any version of Symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.4.41), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1023: Incomplete Comparison with Missing Factors, where the product performs a comparison between entities that must consider multiple factors or characteristics of each entity, but the comparison does not include one or more of these factors. In Symfony, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48761 Affected Symfony Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/html-sanitizer
|
Packagist |
≥ 6.1.0
< 6.4.41
|
6.4.41
|
|
symfony/html-sanitizer
|
Packagist |
≥ 7.0.0
< 7.4.13
|
7.4.13
|
|
symfony/html-sanitizer
|
Packagist |
≥ 8.0.0
< 8.0.13
|
8.0.13
|
|
symfony/symfony
|
Packagist |
≥ 6.1.0
< 6.4.41
|
6.4.41
|
|
symfony/symfony
|
Packagist |
≥ 7.0.0
< 7.4.13
|
7.4.13
|
|
symfony/symfony
|
Packagist |
≥ 8.0.0
< 8.0.13
|
8.0.13
|
References
Frequently Asked Questions
What is CVE-2026-48761?
Which Symfony versions are affected?
What version fixes CVE-2026-48761?
Is symfony/html-sanitizer affected?
Is symfony/symfony affected?
What CWE is associated with CVE-2026-48761?
How can I check Packagist dependencies for CVE-2026-48761?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x5qj-865h-mgvm",
"modified" : "2026-06-15T16:46:53Z",
"published" : "2026-06-15T16:46:53Z",
"aliases" : [ "CVE-2026-48761" ],
"summary" : "Symfony: HtmlSanitizer UrlAttributeSanitizer Misses URL Attributes",
"details" : "### Description\n\n`Symfony\\Component\\HtmlSanitizer\\Visitor\\AttributeSanitizer\\UrlAttributeSanitizer::getSupportedAttributes()` enumerates the attribute names whose values are scrubbed through `UrlSanitizer::sanitize()` (scheme and host allow-lists, `javascript:` rejection, BiDi check, etc.). The list is `['src', 'href', 'lowsrc', 'background', 'ping', 'action', 'formaction', 'poster', 'cite']`. Other URL-bearing attributes are absent: `<object data=…>`, `<applet codebase=…>`, `<applet archive=…>` and `<object archive=…>`, `<iframe longdesc=…>` and `<img longdesc=…>`. When an integrator opts these elements/attributes in via `allowElement('object', ['data'])`, `allowElement('applet', ['codebase'])`, etc., or via `allowAttribute()`, no URL sanitization runs: `data=\"javascript:alert(1)\"` and similar payloads ship through unchanged into the output, enabling stored XSS.\n\n`<meta http-equiv=\"refresh\" content=\"0; url=…\">` is the same class of bug routed differently: the URL is embedded inside a multi-field `content` attribute that the per-attribute sanitizer cannot detect from the attribute name alone. Integrators who enable `<meta>` with the `content` attribute (e.g. via `allowStaticElements()`) see `content=\"0; url=javascript:alert(1)\"` pass through, producing a refresh-driven navigation to a `javascript:` URL.\n\nDefault configurations are not affected: `<object>`, `<applet>` and `<iframe>` are not in `W3CReference::BODY_ELEMENTS` and `<meta>` requires an explicit opt-in to `<head>` context. The vulnerability surface is integrators who explicitly allow any of those elements together with the listed URL-bearing attributes.\n\n### Resolution\n\n`UrlAttributeSanitizer` now also routes `data`, `codebase`, `archive` and `longdesc` through `UrlSanitizer::sanitize()`. A new `MetaRefreshAttributeSanitizer` registered as a default attribute sanitizer detects the `<delay>; url=<url>` syntax inside `<meta content>`, sanitizes the embedded URL, and drops the attribute if the URL is rejected; non-refresh meta `content` values are passed through unchanged.\n\nThe patches for this issue are available [here](https://github.com/symfony/symfony/commit/069a70f9f26e61e9de3b7f9a864a86ed24b36bd0) for branch 6.4 (and forward-ported to 7.4, 8.0 and 8.1).\n\n### Credits\n\nSymfony would like to thank Scott Arciszewski (Trail of Bits) for reporting the issue and Nicolas Grekas for providing the fix.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.4.41"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.13"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.13"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.4.41"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.13"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.13"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-x5qj-865h-mgvm"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/069a70f9f26e61e9de3b7f9a864a86ed24b36bd0"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-48761.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-48761.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2026-48761"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1023", "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-15T16:46:53Z",
"nvd_published_at" : null
}
}