Symfony: Stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering
CVE-2026-45072Published 14 Jul 2026, 18:11 UTC
Real-world risk
0.5/ 10Low
Routine
If the vulnerable configuration applies to you: 1.1
PreliminaryFrom the CVSS vector only · confidence low
CVSS
2.0
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 6.4.24 until 6.4.40, 7.4.12, and 8.0.12, the development profiler file_excerpt Twig filter escapes PHP files through highlight_string() but interpolates lines from non-PHP files directly into <code> elements, allowing stored XSS against a developer who opens an attacker-written file such as var/log/dev.log in the profiler. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| SymfonyWidespread | >= 6.4.24, < 6.4.40; >= 7.2.9, < 7.4.12; >= 8.0.0-BETA1, < 8.0.12 | 6.4.40, 7.4.12, 8.0.12 |
| twigNiche | >= 6.4.24, < 6.4.40 | 6.4.40 |
| web-profiler-bundleNiche | >= 7.2.9, < 7.4.12; >= 8.0.0-BETA1, < 8.0.12 | 7.4.12, 8.0.12 |
What to do
Update to a fixed version: 6.4.40, 7.4.12, 8.0.12.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | LowA real low-privileged account | From the CVSS vector | 0.60 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.2% chance of exploitation in 30 days (percentile 15), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.189
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.189 × threat 0.850.482
- Rounded to one decimal between 0.1 and 100.5
Exploitation and evidence timeline
- 14 Jul 2026 Published
- 3 Dec 2026 Risk 0.5 (cvss fallback)
Weakness
CWE-79
References
- https://github.com/symfony/symfony/security/advisories/GHSA-hmr5-2xcr-v8ppvendor-advisory
- https://github.com/symfony/symfony/commit/863aa81c61166f1aa74b7732df316f76113acbdbmisc
- https://github.com/symfony/symfony/releases/tag/v6.4.40misc
- https://github.com/symfony/symfony/releases/tag/v7.4.12misc
- https://github.com/symfony/symfony/releases/tag/v8.0.12misc
- CVE-2026-45072 on CVE.org