CVE-2026-45072

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

State
Published
Severity
2.0 Low
Published
Jul 14, 2026
Updated
Jul 15, 2026
Reserved
May 8, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
4.02.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:NGitHub_M

Weaknesses

  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected Products

ProductVersions
symfonysymfony
  • >= 6.4.24, < 6.4.40Affected
  • >= 7.2.9, < 7.4.12Affected
  • >= 8.0.0-BETA1, < 8.0.12Affected
twig-bridgesymfony
  • >= 6.4.24, < 6.4.40Affected
web-profiler-bundlesymfony
  • >= 7.2.9, < 7.4.12Affected
  • >= 8.0.0-BETA1, < 8.0.12Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.