CVE-2026-48761: Symfony HtmlSanitizer XSS via incomplete URL attribute sanitization

CVE-2026-48761 · Severity: medium · CVSS 4 · Published 2026-07-14

Symfony is a popular PHP framework used to build web applications. A vulnerability in its HTML sanitization component could allow malicious scripts to bypass security filters when certain HTML tags like iframes or images are used. This could lead to cross-site scripting (XSS) attacks, potentially allowing an attacker to hijack user sessions or steal sensitive information from people visiting the affected website.

Technologies: symfony/html-sanitizer (Packagist), symfony/symfony (Packagist), Symfony HtmlSanitizer. Vendors: Packagist, Symfony.

Quick answers

Is CVE-2026-48761 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-48761 being exploited in the wild.
How severe is CVE-2026-48761?
Medium severity, with a CVSS score of 4, published 14 July 2026.
Which products and versions are affected?
symfony/html-sanitizer (Packagist) ECOSYSTEM:introduced=6.1.0,fixed=6.4.41; symfony/symfony (Packagist) ECOSYSTEM:introduced=6.1.0,fixed=6.4.41; Symfony HtmlSanitizer >= 6.1.0, < 6.4.41; >= 7.0.0, < 7.4.13; >= 8.0.0, < 8.0.13.
Is there a fix for CVE-2026-48761?
Yes. symfony/html-sanitizer (Packagist): upgrade to 6.4.41 or later; symfony/symfony (Packagist): upgrade to 6.4.41 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-48761 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-48761?
Check whether you run symfony/html-sanitizer (Packagist), symfony/symfony (Packagist) or Symfony HtmlSanitizer at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • symfony/html-sanitizer (Packagist): upgrade to 6.4.41 or later
    composer require symfony/html-sanitizer:^6.4.41
  • symfony/symfony (Packagist): upgrade to 6.4.41 or later
    composer require symfony/symfony:^6.4.41

Technical details

A Cross-Site Scripting (XSS) vulnerability exists in the Symfony HtmlSanitizer component due to incomplete attribute coverage in UrlAttributeSanitizer::getSupportedAttributes(). The sanitizer omitted URL-bearing attributes for <object>, <applet>, <iframe>, and <img> tags, and failed to sanitize URLs within <meta http-equiv="refresh"> content. An attacker can exploit this by providing specially crafted HTML containing 'javascript:' or similar malicious payloads that bypass the sanitizer. This allows for the execution of arbitrary JavaScript in the context of the victim's browser. The issue is fixed in Symfony versions 6.4.41, 7.4.13, and 8.0.13.

Affected products

  • Symfony Symfony >= 6.1.0, < 6.4.41; >= 7.0.0-BETA1, < 7.4.13; >= 8.0.0-BETA1, < 8.0.13
  • Symfony html-sanitizer >= 6.1.0, < 6.4.41; >= 7.0.0-BETA1, < 7.4.13; >= 8.0.0-BETA1, < 8.0.13

Identifiers

  • CVE-2026-48761
  • GHSA-x5qj-865h-mgvm

Timeline

  • 2026-07-14: advisory: NVD publication date
  • 2026-05-27: patched: Release of fixed versions 6.4.41, 7.4.13, and 8.0.13

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.