CVE-2026-48761: Symfony HtmlSanitizer UrlAttributeSanitizer Misses URL Attributes Vulnerability

MODERATE
Advisory Identifier: GHSA-x5qj-865h-mgvm
CWE-1023 CWE-79
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-48761
GHSA Identifier GHSA-x5qj-865h-mgvm
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1023: Incomplete Comparison with Missing Factors
Affected Product Symfony
Package Ecosystem Packagist
Published Date
Last Updated

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.

symfony/html-sanitizer fixed: 6.4.41
Upgrade symfony/html-sanitizer to 6.4.41
symfony/html-sanitizer fixed: 7.4.13
Upgrade symfony/html-sanitizer to 7.4.13
symfony/html-sanitizer fixed: 8.0.13
Upgrade symfony/html-sanitizer to 8.0.13
symfony/symfony fixed: 6.4.41
Upgrade symfony/symfony to 6.4.41
symfony/symfony fixed: 7.4.13
Upgrade symfony/symfony to 7.4.13
symfony/symfony fixed: 8.0.13
Upgrade symfony/symfony to 8.0.13
Verify Direct and Transitive Dependencies

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

### Description `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. `<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. Default 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. ### Resolution `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. The 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). ### Credits Symfony would like to thank Scott Arciszewski (Trail of Bits) for reporting the issue and Nicolas Grekas for providing the fix.

CVE-2026-48761 Affected Symfony Versions

6 component(s)
Fixed Versions:
6.4.417.4.138.0.13
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?
CVE-2026-48761 is a security vulnerability in Symfony involving HtmlSanitizer UrlAttributeSanitizer Misses URL Attributes under CWE-1023: Incomplete Comparison with Missing Factors.
Which Symfony versions are affected?
Affected versions include releases prior to 6.4.41, 7.4.13, 8.0.13 across affected packages: symfony/html-sanitizer, symfony/symfony.
What version fixes CVE-2026-48761?
Upgrading to 6.4.41, 7.4.13, 8.0.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/html-sanitizer affected?
Yes, symfony/html-sanitizer is affected in releases prior to 6.4.41, 7.4.13, 8.0.13. Upgrade your dependency to 6.4.41, 7.4.13, 8.0.13 or later.
Is symfony/symfony affected?
Yes, symfony/symfony is affected in releases prior to 6.4.41, 7.4.13, 8.0.13. Upgrade your dependency to 6.4.41, 7.4.13, 8.0.13 or later.
What CWE is associated with CVE-2026-48761?
CVE-2026-48761 is classified under CWE-1023: Incomplete Comparison with Missing Factors (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.).
How can I check Packagist dependencies for CVE-2026-48761?
Run the dependency tree command: 'inspect dependencies for symfony/html-sanitizer'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}