Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. symfony/web-profiler-bundle
  4. ›
  5. CVE-2026-45072

CVE-2026-45072: Symfony Vulnerable to stored XSS in WebProfiler CodeExtension::fileExcerpt() — Unescaped Non-PHP File Rendering

May 27, 2026

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.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45072.yaml
  • github.com/FriendsOfPHP/security-advisories/blob/master/symfony/twig-bridge/CVE-2026-45072.yaml
  • github.com/FriendsOfPHP/security-advisories/blob/master/symfony/web-profiler-bundle/CVE-2026-45072.yaml
  • github.com/advisories/GHSA-hmr5-2xcr-v8pp
  • github.com/symfony/symfony/commit/863aa81c61166f1aa74b7732df316f76113acbdb
  • github.com/symfony/symfony/security/advisories/GHSA-hmr5-2xcr-v8pp
  • nvd.nist.gov/vuln/detail/CVE-2026-45072
  • symfony.com/cve-2026-45072

Code Behaviors & Features

Detect and mitigate CVE-2026-45072 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 7.2.9 before 7.4.12, all versions starting from 8.0.0 before 8.0.12

Fixed versions

  • 7.4.12
  • 8.0.12

Solution

Upgrade to versions 7.4.12, 8.0.12 or above.

Impact 4.6 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

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

Source file

packagist/symfony/web-profiler-bundle/CVE-2026-45072.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:27 +0000.