CVE-2026-45072: Symfony stored XSS in WebProfiler CodeExtension fileExcerpt

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

Symfony, a popular web development framework, contains a security flaw in its development profiler tool. The tool fails to properly clean up non-PHP files, such as log files, before displaying them to developers. If an attacker can write malicious code into a file that a developer later views through this profiler, they could execute unauthorized scripts in the developer's browser, potentially leading to session theft or further compromise of the development environment.

Technologies: symfony/symfony (Packagist). Vendors: Packagist, Symfony.

Quick answers

Is CVE-2026-45072 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45072 being exploited in the wild.
How severe is CVE-2026-45072?
Medium severity, with a CVSS score of 4, published 14 July 2026.
Which products and versions are affected?
symfony/symfony (Packagist) ECOSYSTEM:introduced=6.4.24,fixed=6.4.40; symfony/twig-bridge (Packagist) ECOSYSTEM:introduced=6.4.24,fixed=6.4.40; symfony/web-profiler-bundle (Packagist) ECOSYSTEM:introduced=7.2.9,fixed=7.4.12; Symfony Twig Bridge >= 6.4.24, < 6.4.40; and 1 more.
Is there a fix for CVE-2026-45072?
Yes. symfony/symfony (Packagist): upgrade to 6.4.40 or later; symfony/twig-bridge (Packagist): upgrade to 6.4.40 or later; symfony/web-profiler-bundle (Packagist): upgrade to 7.4.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45072 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-45072?
Check whether you run symfony/symfony (Packagist), symfony/twig-bridge (Packagist), symfony/web-profiler-bundle (Packagist) or one of the others listed 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/symfony (Packagist): upgrade to 6.4.40 or later
    composer require symfony/symfony:^6.4.40
  • symfony/twig-bridge (Packagist): upgrade to 6.4.40 or later
    composer require symfony/twig-bridge:^6.4.40
  • symfony/web-profiler-bundle (Packagist): upgrade to 7.4.12 or later
    composer require symfony/web-profiler-bundle:^7.4.12

Technical details

A stored cross-site scripting (XSS) vulnerability exists in the Symfony TwigBridge and WebProfilerBundle. The 'file_excerpt' Twig filter, used within the development profiler, correctly escapes PHP files using highlight_string() but fails to sanitize content from non-PHP files (such as .log or .html files) before interpolating them into <code> elements. An attacker who can influence the content of files read by the profiler—such as writing to 'var/log/dev.log'—can execute arbitrary JavaScript in the context of a developer's browser session when they view the affected file. The issue is fixed in Symfony versions 6.4.40, 7.4.12, and 8.0.12.

Affected products

  • symfony symfony >= 6.4.24, < 6.4.40; >= 7.2.9, < 7.4.12; >= 8.0.0-BETA1, < 8.0.12
  • symfony twig-bridge >= 6.4.24, < 6.4.40
  • symfony web-profiler-bundle >= 7.2.9, < 7.4.12; >= 8.0.0-BETA1, < 8.0.12

Identifiers

  • CVE-2026-45072
  • GHSA-hmr5-2xcr-v8pp

Timeline

  • 2026-05-20: patched: Fixed in versions 6.4.40, 7.4.12, and 8.0.12
  • 2026-07-14: advisory: NVD publication date

References

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