critical CVSS 9.8

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-pear

Defensia 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 functions

WAF 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

  1. Step 1: Check the installed PHP version with `php -v` and verify PEAR is installed via `pear version`
  2. 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`
  3. 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'`
  4. 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

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-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.
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-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.

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