CVE-2026-25237·PHP vulnerability
PEAR is a framework and distribution system for reusable PHP components. Prior to version 1.33.0, use of preg_replace() with the /e modifier in bug update email handling can enable PHP code execution if attacker-controlled content reaches the evaluated replacement. This issue has been patched in version 1.33.0.
- Severity
- critical
- Software
- PHP
- Fixed in
- 1.33.0
- Published
- 2026-02-03
Affected versions
Until: 1.33.0
Fixed in: 1.33.0
How to fix this CVE
Upgrade PHP and the PEAR framework to version 1.33.0 or later to patch the dangerous preg_replace() /e modifier vulnerability in email handling. This critical flaw allows remote attackers to execute arbitrary PHP code by injecting malicious content into bug update emails. Apply updates immediately across all affected servers.
sudo dnf update php php-pearDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST requests to bug update or email processing endpoints containing preg_replace backreferences (e.g., `$1`, `$2`) or PHP code delimiters (`<?php`, `eval(`) in email body or subject fields; also look for suspicious use of double quotes in replacement parameters passed to vulnerable functionsWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block POST requests to bug tracking or email handling endpoints that contain PHP code patterns (<?php, eval, system, exec, passthru) or regex backreferences in email subject/body fields. Implement input validation to reject emails containing executable code syntax.How to check if you are affected
- Step 1: Check the installed PHP version with `php -v` and verify PEAR is installed via `pear version`
- Step 2: Identify if PEAR email handling components are active by checking `/etc/php.ini` for loaded extensions and reviewing installed PEAR packages with `pear list`
- Step 3: Search web server logs for suspicious preg_replace patterns or eval() calls in POST/GET parameters targeting bug report endpoints: `grep -r 'preg_replace\|eval' /var/log/apache2/ /var/log/nginx/ 2>/dev/null | grep -i 'bug\|email\|update'`
- Step 4: After patching, re-run `php -v` and `pear version` to confirm the version is 1.33.0 or higher, then restart web services with `sudo systemctl restart apache2` or `sudo systemctl restart nginx`
FAQ
What is CVE-2026-25237?
This is a critical remote code execution vulnerability in PEAR's bug update email handler that exploits the deprecated preg_replace() /e modifier, allowing attackers to execute arbitrary PHP code on the server through crafted email content.
Is CVE-2026-25237 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available, but the CVSS 9.8 critical rating warrants immediate patching.
What versions of PHP are affected by CVE-2026-25237?
All PEAR versions prior to 1.33.0 are affected. The vulnerability exists in the email handling code path of the PEAR framework used by PHP installations.
How do I check if my server is vulnerable to CVE-2026-25237?
Run `pear version` to check your PEAR installation version. If it reports anything below 1.33.0, your system is vulnerable. Also check `php -v` to ensure PHP itself is up to date.
Does Defensia detect CVE-2026-25237?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP and PEAR are installed on a monitored server, CVE-2026-25237 will appear in your dashboard with remediation steps.
Related PHP CVEs
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-25237. Free for 1 server.
Get started free