medium CVSS 5.4 EPSS 0.23%

CVE-2026-45072·PHP vulnerability

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.

Severity
medium
Software
PHP
Fixed in
8.0.12
Published

How likely is exploitation

FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.23% — higher than 14% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.

Affected versions

From: 8.0.0

Until: 8.0.12

Fixed in: 8.0.12

How to fix this CVE

Update Symfony to version 8.0.12 or later to patch a stored XSS vulnerability in the development profiler's file_excerpt Twig filter. The vulnerability allows attackers to inject malicious code into non-PHP files that gets rendered without proper escaping when viewed in the profiler. Developers should immediately upgrade to eliminate the risk of XSS attacks targeting development environments.

sudo dnf update php

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

POST|GET /_profiler/.*file_excerpt.*\.log|var/log/dev\.log.*<script|javascript:|<iframe|onerror=|onload=

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

Block or restrict access to the /_profiler endpoint in production environments using a WAF rule that denies requests to paths matching /_profiler.* unless originating from trusted internal IP addresses. Additionally, implement response filtering to encode or strip HTML/JavaScript from profiler output.

How to check if you are affected

  1. Check your Symfony version by running: php bin/console about | grep Symfony or grep -i version composer.lock
  2. Verify if the development profiler is exposed by checking if var/log/dev.log exists and is accessible via the web interface at /_profiler
  3. Search application logs for suspicious script tags or HTML entities in log file entries: grep -E '<script|<iframe|javascript:' var/log/dev.log
  4. Confirm the patch by running: php bin/console about and verifying Symfony version is 8.0.12 or later

Indicators of compromise

  • /_profiler endpoint access with malicious payload in log files
  • Encoded script tags in var/log/dev.log
  • HTTP requests containing script injection attempts to file paths viewable in the profiler

FAQ

What is CVE-2026-45072?

This is a stored XSS vulnerability in Symfony's development profiler where the file_excerpt Twig filter fails to properly escape content from non-PHP files, allowing attackers to inject malicious scripts into log files that execute when a developer views them in the profiler interface.

Is CVE-2026-45072 being actively exploited?

No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available, though the risk remains for development environments with accessible profilers.

What versions of PHP are affected by CVE-2026-45072?

This vulnerability affects Symfony 8.0.0 through 8.0.11 running on PHP. The corresponding affected ranges for other Symfony versions are 6.4.24-6.4.39 and 7.4.0-7.4.11.

How do I check if my server is vulnerable to CVE-2026-45072?

Run 'php bin/console about' to check your Symfony version. If it shows 8.0.0 through 8.0.11, your installation is vulnerable and requires immediate upgrade to 8.0.12 or later.

Does Defensia detect CVE-2026-45072?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP and Symfony are installed on a monitored server, CVE-2026-45072 will appear in your dashboard with remediation steps.

Related PHP CVEs

CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.
CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.
CVE-2026-39337CVSS 10ChurchCRM is an open-source church management system. Prior to 7.1.0, critical pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The "$dbPassword" variable is not sanitized. This vulnerability exists due to an incomplete fix for CVE-2025-62521. This vulnerability is fixed in 7.1.0.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-45072. Free for 1 server.

Get started free