CVE-2025-14180·PHP vulnerability
In PHP versions 8.1.* before 8.1.34, 8.2.* before 8.2.30, 8.3.* before 8.3.29, 8.4.* before 8.4.16, 8.5.* before 8.5.1 when using the PDO PostgreSQL driver with PDO::ATTR_EMULATE_PREPARES enabled, an invalid character sequence (such as \x99) in a prepared statement parameter may cause the quoting function PQescapeStringConn to return NULL, leading to a null pointer dereference in pdo_parse_params() function. This may lead to crashes (segmentation fault) and affect the availability of the target server.
- Severity
- high
- Software
- PHP
- Fixed in
- 8.5.1
- Published
- 2025-12-27
Affected versions
From: 8.5.0
Until: 8.5.1
Fixed in: 8.5.1
How to fix this CVE
Upgrade PHP to version 8.5.1 or later to resolve this denial-of-service vulnerability in the PDO PostgreSQL driver. If you are running PHP 8.1, 8.2, 8.3, or 8.4, apply the corresponding security updates (8.1.34+, 8.2.30+, 8.3.29+, or 8.4.16+ respectively). Ensure PDO::ATTR_EMULATE_PREPARES is disabled in your PDO configuration when possible, as this setting increases the risk surface for this issue.
sudo dnf update phpDefensia detects this vulnerability
How to check if you are affected
- Run `php -v` to verify your current PHP version and check if it falls within the vulnerable ranges: 8.1.x < 8.1.34, 8.2.x < 8.2.30, 8.3.x < 8.3.29, 8.4.x < 8.4.16, or 8.5.0
- Check your PHP configuration with `php -i | grep -i pdo.pgsql` and verify whether PDO::ATTR_EMULATE_PREPARES is explicitly enabled in your application code or php.ini
- Search application error logs for segmentation fault messages ("Segmentation fault" or "SIGSEGV") that occur during database query processing, particularly in PDO PostgreSQL contexts
- After upgrading, run `php -v` again to confirm the patched version is active, then restart PHP-FPM or your web server with `sudo systemctl restart php-fpm` or `sudo systemctl restart apache2/nginx`
FAQ
What is CVE-2025-14180?
This is a denial-of-service vulnerability in PHP's PDO PostgreSQL driver where certain invalid byte sequences in prepared statement parameters cause a null pointer dereference, resulting in application crashes (segmentation faults). The issue only occurs when PDO::ATTR_EMULATE_PREPARES is enabled.
Is CVE-2025-14180 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available.
What versions of PHP are affected by CVE-2025-14180?
PHP 8.1.0 through 8.1.33, 8.2.0 through 8.2.29, 8.3.0 through 8.3.28, 8.4.0 through 8.4.15, and 8.5.0 are vulnerable. PHP 8.5.1 and later patch versions in other release lines resolve the issue.
How do I check if my server is vulnerable to CVE-2025-14180?
Run `php -v` to check your version number. If it matches one of the vulnerable ranges listed above and your application uses PDO with PostgreSQL while enabling PDO::ATTR_EMULATE_PREPARES, your server is at risk.
Does Defensia detect CVE-2025-14180?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP is installed on a monitored server, CVE-2025-14180 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-2025-14180. Free for 1 server.
Get started free