Symfony Profiler: Stored Cross-Site Scripting in File Excerpts
Published as "CVE-2026-45072: Stored XSS in WebProfiler CodeExtension::fileExcerpt(): Unescaped Non-PHP File Rendering"
- CVE
- CVE-2026-45072
- GHSA
- GHSA-hmr5-2xcr-v8pp
- Packagist
- PKSA-smg5-pq2q-kjkh
- Reported
- May 20, 2026
Lets someone who can write to a project file, like a log, run script in a developer's browser when they view it in the profiler.
Affected and fixed versions
In 3 packages: symfony/symfony, symfony/twig-bridge and symfony/web-profiler-bundle.
Find the row for the version you run, and update to the release next to it.
| If you run | Update to | Support |
|---|---|---|
| 7.4.0 – 7.4.11 | 7.4.12 | Supported |
| 6.4.24 – 6.4.39 | 6.4.40 | Supported |
Show 3 older branches, no longer supported
| 8.0.0 – 8.0.11 | 8.0.12 |
| 7.2.9 – 7.2.x | 7.4.12 |
| 7.3.0 – 7.3.x | 7.4.12 |
Upgrade
Run the line for the branch you are on. 2 other packages listed above are affected too; update them the same way.
composer require symfony/symfony:^7.4.12 composer require symfony/symfony:^6.4.40
Check your app with an agent
Paste this into a coding agent that can read your project, such as Claude Code, Codex or Amp. It checks your composer.lock against the versions above and tells you what to update, without changing anything.
Check whether the PHP project you have access to is affected by this security advisory, and tell me what to update. Do a read-only check: don't edit files, don't run composer update or composer require, and don't try to reproduce the flaw. Advisory: Symfony Profiler: Stored Cross-Site Scripting in File Excerpts (CVE-2026-45072, GHSA-hmr5-2xcr-v8pp) Details: https://phpnews.net/security/symfony/ghsa-hmr5-2xcr-v8pp Affected versions, as Composer constraints: - symfony/symfony: >=6.4.24,<6.4.40|>=7.2.9,<7.3.0|>=7.3.0,<7.4.0|>=7.4.0,<7.4.12|>=8.0.0,<8.0.12 - symfony/twig-bridge: >=6.4.24,<6.4.40 - symfony/web-profiler-bundle: >=7.2.9,<7.3.0|>=7.3.0,<7.4.0|>=7.4.0,<7.4.12|>=8.0.0,<8.0.12 Fixed releases on branches that still get security fixes: - 7.4.0 – 7.4.11: update to 7.4.12 - 6.4.24 – 6.4.39: update to 6.4.40 1. Find every composer.lock in the project outside vendor/ (a monorepo can have one per app) and read the installed version of each package above. Packages installed as dependencies of other packages count too. 2. Compare each installed version with its constraint: "|" separates alternative ranges, and "," means both bounds apply. 3. For each affected install, read the project's advisory at https://symfony.com/cve-2026-45072 and check whether the project meets the conditions it describes (if that page won't load, use https://github.com/advisories/GHSA-hmr5-2xcr-v8pp). Say which conditions you could check and which you couldn't. 4. Report a table: lock file | package | installed version | affected (yes, no or unknown) | conditions met (yes, no or unknown) | update to | evidence. For each affected package, give the command that would fix it, without running it: composer update <package> --with-dependencies when it is only installed as a dependency of another package, or composer require with the fixed version when composer.json requires it directly. If the installed version is on a branch with no fixed release listed, say it needs a move to a newer branch.