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

Source: https://junglewise.ai/threats/cve-2026-45072-symfony-stored-xss-in-webprofiler-codeextension-fileexcerpt  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-14. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/symfony-symfony). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist), [Symfony](https://junglewise.ai/threats/vendors/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

  ```sh
  composer require symfony/symfony:^6.4.40
  ```

- symfony/twig-bridge (Packagist): upgrade to 6.4.40 or later

  ```sh
  composer require symfony/twig-bridge:^6.4.40
  ```

- symfony/web-profiler-bundle (Packagist): upgrade to 7.4.12 or later

  ```sh
  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

- [https://github.com/symfony/symfony/commit/863aa81c61166f1aa74b7732df316f76113acbdb](https://github.com/symfony/symfony/commit/863aa81c61166f1aa74b7732df316f76113acbdb)
- [https://github.com/symfony/symfony/releases/tag/v6.4.40](https://github.com/symfony/symfony/releases/tag/v6.4.40)
- [https://github.com/symfony/symfony/releases/tag/v7.4.12](https://github.com/symfony/symfony/releases/tag/v7.4.12)
- [https://github.com/symfony/symfony/releases/tag/v8.0.12](https://github.com/symfony/symfony/releases/tag/v8.0.12)
- [https://github.com/symfony/symfony/security/advisories/GHSA-hmr5-2xcr-v8pp](https://github.com/symfony/symfony/security/advisories/GHSA-hmr5-2xcr-v8pp)

## Related threats

- [Symfony YAML stack exhaustion in inline lexer](https://junglewise.ai/threats/cve-2026-109413-in-symfony-yaml-prior-to-versions-5-4-54-6-4-45-7-4-18-and-8-1-6)
- [Symfony HTTP Foundation ReDoS in HeaderUtils::split()](https://junglewise.ai/threats/cve-2026-108082-symfony-is-a-php-framework-for-web-and-console-applications-and)
- [Symfony Routing improper dot-segment encoding in UrlGenerator](https://junglewise.ai/threats/cve-2026-48784-symfony-routing-improper-dot-segment-encoding-in-urlgenerator)
- [Symfony HtmlSanitizer XSS via incomplete URL attribute sanitization](https://junglewise.ai/threats/cve-2026-48761-symfony-htmlsanitizer-xss-via-incomplete-url-attribute)
- [Symfony HtmlSanitizer visual spoofing via percent-encoded BiDi characters](https://junglewise.ai/threats/cve-2026-48760-symfony-htmlsanitizer-visual-spoofing-via-percent-encoded-bidi)
