CVE-2025-14180: NULL Pointer Dereference in PHP PDO PostgreSQL Emulated Prepares
- Vendor
- PHP Group
CVE-2025-14180 is a NULL pointer dereference in PHP PDO parameter parsing when the PostgreSQL driver is used with PDO::ATTR_EMULATE_PREPARES enabled. It affects PHP 8.1 before 8.1.34, 8.2 before 8.2.30, 8.3 before 8.3.29, 8.4 before 8.4.16, and 8.5 before 8.5.1. An invalid multibyte sequence in a bound string parameter causes PostgreSQL's PQescapeStringConn to report a quoting error, after which the driver's quoting routine returns NULL. The pdo_parse_params() function subsequently accesses that value through ZSTR_LEN(plc->quoted) without an adequate NULL check, causing a segmentation fault and terminating the PHP process.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation terminates the PHP process handling the malicious parameter, interrupting request processing and reducing application availability. Repeated triggering can cause denial of service. In workflows that commit changes before executing the affected statement, process termination can also leave partially completed operations and inconsistent application state; this behavior has been demonstrated with autocommit enabled. Code execution or sensitive-memory disclosure is not established for this vulnerability.
Mitigation
If you can’t patch tonight, do this now.
Disable PDO::ATTR_EMULATE_PREPARES for affected PostgreSQL connections and use native prepared statements, which are the pdo_pgsql default. Verify that application or framework configuration does not re-enable emulation. This avoids the vulnerable emulated-parameter quoting path pending an upgrade.
Remediation
Patch, then assume compromise.
Upgrade PHP to 8.1.34, 8.2.30, 8.3.29, 8.4.16, 8.5.1, or a later supported release containing the fix. For Debian-packaged deployments, fixed versions include php8.2 8.2.30-1~deb12u1 for bookworm and php8.4 8.4.16-1~deb13u1 for trixie. Update embedded or buildpack-provided PHP runtimes as applicable and ensure deployed applications use the patched runtime.
Exploits
1 exploit validated by Mallory's analysis.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2025-14180 exploited in the wild?
- As of Oct 17, 2026, Mallory has no reports of CVE-2025-14180 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-14180?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2025-14180, the earliest disclosed Apr 29, 2026.
- Is there a patch for CVE-2025-14180?
- Upgrade PHP to 8.1.34, 8.2.30, 8.3.29, 8.4.16, 8.5.1, or a later supported release containing the fix. For Debian-packaged deployments, fixed versions include php8.2 8.2.30-1~deb12u1 for bookworm and php8.4 8.4.16-1~deb13u1 for trixie.
- What products are affected by CVE-2025-14180?
- PHP Group Php.
- How severe is CVE-2025-14180?
- CVE-2025-14180 has a CVSS v4 score of 8.2 (High) and an EPSS score of 0.70% (54th percentile) as of Oct 17, 2026.
Recent activity
20 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.