Skip to content

Symfony

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?

ProductAffected 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.126.4.40, 7.4.12, 8.0.12
twigNiche>= 6.4.24, < 6.4.406.4.40
web-profiler-bundleNiche>= 7.2.9, < 7.4.12; >= 8.0.0-BETA1, < 8.0.127.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

FactorValueEvidence×
ImpactMinorReflected XSS, CSRF with low effect, open redirect, minor leakFrom the CVSS vector0.30
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
Privileges neededLowA real low-privileged accountFrom the CVSS vector0.60
Victim interactionRoutineA normal action: open a file, visit a page, click a linkFrom the CVSS vector0.70
ConfigurationUncommonNeeds a non-default feature that a minority enablesFrom the CVSS vector0.45
ReliabilityReliableDeterministic: injection, logic bug, path traversalFrom the CVSS vector1.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
  1. Prerequisites multiplied together0.189
  2. Threat T1: Nothing known0.850
  3. 10 × impact 0.3 × prerequisites 0.189 × threat 0.850.482
  4. Rounded to one decimal between 0.1 and 100.5

How the score works

Exploitation and evidence timeline

  1. 14 Jul 2026 Published
  2. 3 Dec 2026 Risk 0.5 (cvss fallback)

Weakness

CWE-79

References

Get alerts for Symfony

Free email or text alerts when a vulnerability in Symfony reaches risk 8 or higher. Nothing else.