CVE-2026-25237CWE-624

PEAR is Vulnerable to PHP Code Execution via preg_replace /e in Bug Update Emails

Critical · published February 3, 2026

CVSS v4.0
9.2
EPSS
0%
Percentile
33.5
In the wild
Unconfirmed
What it is

🚨 A little PHP magic in the wrong hands could spell disaster! Before version 1.33.0, PEAR's preg_replace() function was like an open stage for attackers, allowing them to execute PHP code with just a little crafty input. 🔥 Think of it like a restaurant where the chef blindly follows any recipe handed to them — an attacker could submit a recipe filled with harmful ingredients, and the chef would unknowingly whip up a toxic dish for everyone to consume. If an attacker can get their hands on the evaluated replacement, they could run arbitrary PHP code on your server! This could lead to unauthorized access, data leaks, or even full system compromise — a nightmare scenario for any developer. 😱

Put simply

Think of it like a restaurant where the chef blindly follows any recipe handed to them — an attacker could submit a recipe filled with harmful ingredients, and the chef would unknowingly whip up a toxic dish for everyone to consume. This vulnerability in PEAR arises from using preg_replace() with the /e modifier, which evaluates the replacement as PHP code. This means if malicious content reaches the mail handling system, it could be executed with full permissions.

What to do

If an attacker can get their hands on the evaluated replacement, they could run arbitrary PHP code on your server! This could lead to unauthorized access, data leaks, or even full system compromise — a nightmare scenario for any developer. 😱 Immediately upgrade to PEAR version 1.33.0 or later to close off this critical hole. Additionally, review any existing code for vulnerable usage of preg_replace() and consider removing the /e modifier from your applications entirely. 🛡️ You've got this! Patch up, tighten those security bolts, and rest easy knowing your project is safer. 💪✨

The record
Technical detail
CVSS v4.0
9.2 · CRITICAL
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS
0.00402 · 33.5th percentile
Weakness
CWE-624 · Executable Regular Expression Error
Published
2026-02-03T18:29Z
EPSS history
Timeline
  • 03 FEB 18:29Z
    PEAR is Vulnerable to PHP Code Execution via preg_replace /e in Bug Update Emails
    cvelistv5