{"vuln_id":"CVE-2025-14180","aliases":["CVE-2025-14177","CVE-2025-14178","GHSA-8xr5-qppj-gvwj"],"description":"php8.2 - security update","published_at":"2025-12-18T16:10:58Z","modified_at":"2026-11-20T01:19:12.022466Z","first_seen_at":"2026-11-21T19:15:06.060498Z","severity":"high","severity_source":"cvss","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-476"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00697,"epss_percentile":0.53965,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-14180"},"matched_alias":null,"items":[{"id":479,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DSA-6154-1 / CVE-2025-14177 - php8.2 - security update","summary":"Affected: Debian:12:php8.2\n\nFixed in: 8.2.30-1~deb12u1","url":"https://osv.dev/vulnerability/DSA-6154-1","published_at":"2026-03-02T00:00:00Z","updated_at":"2026-11-20T01:19:11.565121Z","fetched_at":"2026-11-21T19:15:05.963723Z","severity":"high","cvss_score":8.2,"epss":0.00697,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2025-14177","vuln_ids":["CVE-2025-14177","CVE-2025-14178","CVE-2025-14180","DSA-6154-1","GHSA-3237-QQM7-MFV7","GHSA-8XR5-QPPJ-GVWJ","GHSA-H96M-RVF9-JGM2"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":359,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/479","html":"https://vulnwatch.ve1ve2.com/item/479"}},{"id":11914,"source":{"id":"debian13-php","name":"Debian 13 php8.4 (package vulnerabilities)"},"title":"php8.4 (Debian:13): DEBIAN-CVE-2025-14180 / CVE-2025-14180 - 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 wit…","summary":"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.\n\nAffected: Debian:12:php8.2, Debian:13:php8.4, Debian:14:php8.4\n\nFixed in: 8.4.16-1~deb13u1, 8.4.16-1\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2025-14180","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2025-14180","published_at":"2025-12-27T20:15:40.717000Z","updated_at":"2026-10-14T09:47:31.281301Z","fetched_at":"2026-11-22T13:39:48.366390Z","severity":"high","cvss_score":7.5,"epss":0.00697,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.4","vuln_id":"CVE-2025-14180","vuln_ids":["CVE-2025-14177","CVE-2025-14178","CVE-2025-14180","DEBIAN-CVE-2025-14180","GHSA-8XR5-QPPJ-GVWJ"],"tags":["package-watch","pkg:php8.4","stack","debian13","fix-available"],"cluster_id":361,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/11914","html":"https://vulnwatch.ve1ve2.com/item/11914"}},{"id":520,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DEBIAN-CVE-2025-14180 / CVE-2025-14180 - 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 wit…","summary":"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.\n\nAffected: Debian:12:php8.2, Debian:13:php8.4, Debian:14:php8.4\n\nFixed in: 8.2.30-1~deb12u1\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2025-14180","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2025-14180","published_at":"2025-12-27T20:15:40.717000Z","updated_at":"2026-10-14T09:47:31.281301Z","fetched_at":"2026-11-21T19:15:05.963783Z","severity":"high","cvss_score":7.5,"epss":0.00697,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2025-14180","vuln_ids":["CVE-2025-14177","CVE-2025-14178","CVE-2025-14180","DEBIAN-CVE-2025-14180","GHSA-8XR5-QPPJ-GVWJ"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":361,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/520","html":"https://vulnwatch.ve1ve2.com/item/520"}},{"id":11897,"source":{"id":"debian13-php","name":"Debian 13 php8.4 (package vulnerabilities)"},"title":"php8.4 (Debian:13): DSA-6088-1 / CVE-2025-14177 - php8.4 - security update","summary":"Affected: Debian:13:php8.4\n\nFixed in: 8.4.16-1~deb13u1","url":"https://osv.dev/vulnerability/DSA-6088-1","published_at":"2025-12-21T00:00:00Z","updated_at":"2026-11-20T01:19:12.022466Z","fetched_at":"2026-11-22T13:39:48.366368Z","severity":"high","cvss_score":8.2,"epss":0.00697,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.4","vuln_id":"CVE-2025-14177","vuln_ids":["CVE-2025-14177","CVE-2025-14178","CVE-2025-14180","DSA-6088-1","GHSA-3237-QQM7-MFV7","GHSA-8XR5-QPPJ-GVWJ","GHSA-H96M-RVF9-JGM2"],"tags":["package-watch","pkg:php8.4","stack","debian13","fix-available"],"cluster_id":359,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/11897","html":"https://vulnwatch.ve1ve2.com/item/11897"}},{"id":12651,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-8xr5-qppj-gvwj / CVE-2025-14180: NULL Pointer Dereference in PDO quoting","summary":"NULL Pointer Dereference in PDO quoting **Product:** PHP **Version:** 8.5.0-DEV (CLI) **CWE-ID:** CWE-476: NULL Pointer Dereference **CVSS vector v.4.0:** 8.2 (AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N) **Description:** A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. **Exploitation conditions:** An unauthorized user **Mitigation:** Explicitly check whether a NULL pointer exists before dereferencing it. **Researcher:** Aleksey Solovev (Positive Technologies) ## Research The vulnerable source code is the `ZSTR_LEN(plc->quoted)` macro call in the `pdo_parse_params` function in `php-src/ext/pdo/pdo_sql_parser.re`. Inside the `ZSTR_LEN(plc->quoted)` macro, the `len` field is accessed. _Figure 1. The `ZSTR_LEN` macro_ However, when using a special character sequence, `plc->quoted` is equal to `0x0`. _Figure 2. The vulnerable source code_ The `plc->quoted` field is generated in this case on line 302 when calling the `stmt->dbh->methods->quoter` function. _Figure 3. `plc->quoted` initialization_ When calling `stmt->dbh->methods->quoter`, the quoting function `pgsql_handle_quoter` for PG will be called. On line 407, it will call the PG library function `PQescapeStringConn`, which will return an error when processing the special sequence, returning NULL as a result. This result will be assigned to the `plc->quoted` field. _Figure 4. Returning NULL when error occurs_ ## Vulnerability reproduction The PHP language was compiled using the following commands. _Listing 1. Compiling PHP_ ``` $ git clone https://github.com/php/php-src.git $ cd php-src $ ./buildconf $ ./configure CFLAGS=\"-fsanitize=address -g\" CXXFLAGS=\"-fsanitize=address -g\" LDFLAGS=\"-fsanitize=address\" --with-pdo-pgsql --enable-debug $ make -j8 $ ./sapi/cli/php -v PHP 8.5.0-dev (cli) (built: Sep 22 2025 13:24:35) (NTS DEBUG) Copyright (c) The PHP Group Zend Engine v4.5.0-dev, Copyright (c) Zend Technologies with Zend OPcache v8.5.0-dev, Copyright (c), by Zend Technologies ``` Next, the following PHP code was placed on the server, causing to `Segmentation fault`. Enabling the `PDO::ATTR_EMULATE_PREPARES` mode is the key element of this code. The problem is caused by a non-existent sequence of characters in hexadecimal notation, for example `\\x99`. _Listing 2. Source code on the server_ ```","url":"https://github.com/php/php-src/security/advisories/GHSA-8xr5-qppj-gvwj","published_at":"2025-12-18T16:10:58Z","updated_at":"2025-12-18T16:10:58Z","fetched_at":"2026-11-22T14:05:37.431188Z","severity":"high","cvss_score":7.5,"epss":0.00697,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2025-14180","vuln_ids":["CVE-2025-14177","CVE-2025-14178","CVE-2025-14180","GHSA-8XR5-QPPJ-GVWJ"],"tags":["repo-advisory","CWE-476","security","repo:php/php-src","stack"],"cluster_id":11759,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12651","html":"https://vulnwatch.ve1ve2.com/item/12651"}}]}