CVE-2026-45072
published 2026-07-14CVE-2026-45072: 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…
PriorityP430medium5.4CVSS 3.1
AVNACLPRLUIRSCCLILAN
EPSS
0.23%
14.1th percentile
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 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.
Affected
15 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| sensiolabs | symfony | >= 6.4.24 < 6.4.40 | 6.4.40 |
| sensiolabs | symfony | >= 7.2.9 < 7.4.12 | 7.4.12 |
| sensiolabs | symfony | >= 8.0.0 < 8.0.12 | 8.0.12 |
| symfony | symfony | — | — |
| symfony | symfony | — | — |
| symfony | symfony | — | — |
| symfony | symfony | >= 6.4.24 < 6.4.40 | 6.4.40 |
| symfony | symfony | >= 7.2.9 < 7.4.12 | 7.4.12 |
| symfony | symfony | >= 8.0.0 < 8.0.12 | 8.0.12 |
| symfony | twig-bridge | — | — |
| symfony | twig-bridge | >= 6.4.24 < 6.4.40 | 6.4.40 |
| symfony | web-profiler-bundle | — | — |
| symfony | web-profiler-bundle | — | — |
| symfony | web-profiler-bundle | >= 7.2.9 < 7.4.12 | 7.4.12 |
| symfony | web-profiler-bundle | >= 8.0.0 < 8.0.12 | 8.0.12 |
CVSS provenance
nvdv3.15.4MEDIUMCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
nvdv4.02.0LOWCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
VulDB
Symfony WebProfiler fileExcerpt cross site scripting
vuldb·2026-05-28
CVE-2026-45072 [LOW] Symfony WebProfiler fileExcerpt cross site scripting
A vulnerability was found in Symfony. It has been declared as problematic. The impacted element is the function CodeExtension::fileExcerpt of the component WebProfiler. Such manipulation leads to cross site scripting.
This vulnerability is referenced as CVE-2026-45072. It is possible to launch the attack remotely. No exploit is available.
It is recommended to upgrade the affected component.
GHSA
Symfony Vulnerable to stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering
ghsa·2026-05-27
CVE-2026-45072 [LOW] CWE-79 Symfony Vulnerable to stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering
Symfony Vulnerable to stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering
### Description
Symfony's profiler, a development only debug UI, renders source-code excerpts on several pages using Twig's custom `file_excerpt` filter. This filter renders PHP files via `highlight_string()` (which escapes HTML), but renders **non-PHP files** by splitting on `\n` and interpolating each line directly into `{$line}` with no escaping.
An attacker who can write arbitrary bytes into any file under the project root (including e.g. `var/log/dev.log`), achieves **stored XSS** against any developer who later opens that file in the profiler.
### Resolution
The `file_excerpt` filter now properly escapes each line of non-PHP files using `htmlspecialchars()` before conc
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/symfony/symfony/commit/863aa81c61166f1aa74b7732df316f76113acbdbhttps://github.com/symfony/symfony/releases/tag/v6.4.40https://github.com/symfony/symfony/releases/tag/v7.4.12https://github.com/symfony/symfony/releases/tag/v8.0.12https://github.com/symfony/symfony/security/advisories/GHSA-hmr5-2xcr-v8pp
2026-07-14
Published