Every CVE Search/ Get API key

CVE-2026-45072

Symfony: Stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering

2.0 LowFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
Active

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
None

Exploit likelihood

0.30%Up 0.2 points since Jun 12, 2026
90%50%10%1%

What each source reports

CVE List Score used 2.0

Symfony: Stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering

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.

Record
CVE-2026-45072
CVSS 4.0
2.0 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2026-44366 2.0

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.

Record
EUVD-2026-44366
CVSS 4.0
2.0 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-hmr5-2xcr-v8pp 1.2

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 <code>{$line}</code> 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 concatenating them.

The patch for this issue is available here for branch 6.4.

Credits

Symfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.

Record
GHSA-hmr5-2xcr-v8pp
CVSS 4.0
1.2 LowCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U
Weakness
CWE-79
Updated
2026-11-02
NVD 2.0

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.

Record
CVE-2026-45072
CVSS 4.0
2.0 LowCVSS: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
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 2.0

Symfony: Stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering

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.

Record
CVE-2026-45072
CVSS 4.0
2.0 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
OSVDEBIAN-CVE-2026-45072 5.4

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.

Record
DEBIAN-CVE-2026-45072
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-hmr5-2xcr-v8pp 1.2

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 <code>{$line}</code> 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 concatenating them.

The patch for this issue is available here for branch 6.4.

Credits

Symfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.

Record
GHSA-hmr5-2xcr-v8pp
CVSS 4.0
1.2 LowCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U
Weakness
CWE-79
Updated
2026-11-02
OSVUBUNTU-CVE-2026-45072 2.0

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.

Record
UBUNTU-CVE-2026-45072
CVSS 4.0
2.0 LowCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
symfony/symfony
Packagist
6.4.24 up to 6.4.40
6.4.40
symfony/symfony
Packagist
7.2.9 up to 7.4.12
7.4.12
symfony/symfony
Packagist
8.0.0 up to 8.0.12
8.0.12
symfony/twig-bridge
Packagist
6.4.24 up to 6.4.40
6.4.40
symfony/web-profiler-bundle
Packagist
7.2.9 up to 7.4.12
7.4.12
symfony/web-profiler-bundle
Packagist
8.0.0 up to 8.0.12
8.0.12
symfony
Debian:13
before 6.4.41+dfsg-0+deb13u1, plus listed versions
6.4.21+dfsg-26.4.21+dfsg-2+deb13u16.4.24+dfsg-16.4.25+dfsg-16.4.40+dfsg-0+deb13u1
6.4.41+dfsg-0+deb13u1
symfony
Debian:14
before 7.4.12+dfsg-1, plus listed versions
6.4.21+dfsg-26.4.24+dfsg-16.4.25+dfsg-17.0.4+dfsg-17.0.5+dfsg-1
Show 45 moreShow less
7.0.6+dfsg-17.0.7+dfsg-17.1.0~beta1+dfsg-17.1.0~rc1+dfsg-17.1.2+dfsg-17.1.3+dfsg-17.1.4+dfsg-17.1.5+dfsg-17.2.0~beta1+dfsg-17.2.0~beta2+dfsg-17.2.0~rc1+dfsg-17.2.1+dfsg-17.2.2+dfsg-17.2.3+dfsg-17.2.4+dfsg-17.2.5+dfsg-17.2.6-17.3.0+dfsg-17.3.0~beta1+dfsg-17.3.0~beta2+dfsg-17.3.0~rc1+dfsg-17.3.1+dfsg-17.3.2+dfsg-17.3.3+dfsg-17.3.4+dfsg-17.3.5-17.4.0+dfsg-17.4.0+dfsg-27.4.0~beta1-17.4.0~beta1-27.4.0~beta2+dfsg-17.4.0~beta2+dfsg-27.4.0~beta2+dfsg-37.4.0~rc1+dfsg-17.4.0~rc2+dfsg-17.4.0~rc3+dfsg-17.4.10+dfsg-17.4.2+dfsg-17.4.2+dfsg-27.4.3+dfsg-17.4.4+dfsg-17.4.5+dfsg-17.4.6+dfsg-17.4.6+dfsg-27.4.7+dfsg-1
7.4.12+dfsg-1
symfony/symfony
Packagist
6.4.24 up to 6.4.40, plus listed versions
v6.4.24v6.4.25v6.4.26v6.4.27v6.4.28
Show 11 moreShow less
v6.4.29v6.4.30v6.4.31v6.4.32v6.4.33v6.4.34v6.4.35v6.4.36v6.4.37v6.4.38v6.4.39
6.4.40
symfony/symfony
Packagist
7.2.9 up to 7.4.12, plus listed versions
v7.2.9v7.3.0v7.3.0-BETA1v7.3.0-BETA2v7.3.0-RC1
Show 28 moreShow less
v7.3.1v7.3.10v7.3.11v7.3.2v7.3.3v7.3.4v7.3.5v7.3.6v7.3.7v7.3.8v7.3.9v7.4.0v7.4.0-BETA1v7.4.0-BETA2v7.4.0-RC1v7.4.0-RC2v7.4.0-RC3v7.4.1v7.4.10v7.4.11v7.4.2v7.4.3v7.4.4v7.4.5v7.4.6v7.4.7v7.4.8v7.4.9
7.4.12
Show 12 moreShow less
Affected packages
PackageAffectedFixed
symfony/symfony
Packagist
8.0.0 up to 8.0.12, plus listed versions
v8.0.0v8.0.1v8.0.10v8.0.11v8.0.2
Show 7 moreShow less
v8.0.3v8.0.4v8.0.5v8.0.6v8.0.7v8.0.8v8.0.9
8.0.12
symfony/twig-bridge
Packagist
6.4.24 up to 6.4.40, plus listed versions
v6.4.24v6.4.25v6.4.30v6.4.31v6.4.32v6.4.34v6.4.35v6.4.36
6.4.40
symfony/web-profiler-bundle
Packagist
7.2.9 up to 7.4.12, plus listed versions
v7.2.9v7.3.0v7.3.0-BETA1v7.3.0-RC1v7.3.1
Show 17 moreShow less
v7.3.10v7.3.2v7.3.3v7.3.4v7.3.5v7.3.9v7.4.0v7.4.0-BETA1v7.4.0-RC1v7.4.0-RC3v7.4.11v7.4.3v7.4.4v7.4.6v7.4.7v7.4.8v7.4.9
7.4.12
symfony/web-profiler-bundle
Packagist
8.0.0 up to 8.0.12, plus listed versions
v8.0.0v8.0.11v8.0.3v8.0.4v8.0.6v8.0.7v8.0.8v8.0.9
8.0.12
symfony
Ubuntu:16.04:LTS
All versions, plus listed versions
2.7.1+dfsg-12.7.5+dfsg-12.7.9+dfsg-12.7.9+dfsg-1ubuntu22.7.10-0ubuntu2
None known
symfony
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
2.8.7+dfsg-1.3ubuntu13.4.3+dfsg-1ubuntu43.4.6+dfsg-13.4.6+dfsg-1ubuntu0.13.4.6+dfsg-1ubuntu0.1+esm13.4.6+dfsg-1ubuntu0.1+esm2
None known
symfony
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
4.3.4+dfsg-1ubuntu14.3.8+dfsg-1ubuntu14.3.8+dfsg-1ubuntu1+esm14.3.8+dfsg-1ubuntu1+esm2
None known
symfony
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
5.2.6+dfsg-1ubuntu75.4.4+dfsg-1ubuntu85.4.4+dfsg-1ubuntu8+esm1
None known
symfony
Ubuntu:Pro:24.04:LTS
All versions, plus listed versions
5.4.23+dfsg-1ubuntu15.4.35+dfsg-3ubuntu16.4.5+dfsg-3ubuntu26.4.5+dfsg-3ubuntu36.4.5+dfsg-3ubuntu3+esm1
None known
symfony
Ubuntu:25.10
All versions, plus listed versions
6.4.18+dfsg-1ubuntu16.4.21+dfsg-26.4.21+dfsg-2ubuntu16.4.24+dfsg-1
None known
symfony
Ubuntu:26.10
All versions, plus listed versions
7.4.7+dfsg-1ubuntu17.4.9+dfsg-1ubuntu17.4.13+dfsg-2ubuntu17.4.14+dfsg-1ubuntu27.4.15+dfsg-2ubuntu27.4.16+dfsg-1ubuntu2
None known
symfony
Ubuntu:26.04:LTS
All versions, plus listed versions
6.4.24+dfsg-17.4.5+dfsg-1ubuntu17.4.6+dfsg-2ubuntu17.4.7+dfsg-1ubuntu1
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-45072 is a low vulnerability (CVSS 2.0) in Sensiolabs Symfony, published May 27, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.30%, the 23rd percentile. Fixed in symfony/symfony 6.4.40.

References

Show 11 moreShow less
This page doesn't list everything

Left out here: 2 versions. The JSON record has them.

MoveEnter Open