cve.bz

CVE-2025-14179 php php: SQL Injection

7.4 highEPSS 0.4%

High (7.4) in php php. EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, and 8.5.* before 8.5.6, the PDO Firebird driver improperly handles NUL bytes when preparing SQL queries. During token-by-token query construction, a string token containing a NUL byte is copied via strncat(), which stops at the NUL byte, dropping the closing quote and causing subsequent SQL tokens to be interpreted as part of the string. This allows SQL injection when attacker-controlled values are quoted via PDO::quote() and embedded in SQL statements.

Severity

CVSS 4.0

7.4 high
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P/AU:Y/RE:M/U:Amber

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 39th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-05-11. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-14179 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-14179?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-14179?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-14179 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
PHP Group PHPfrom 8.2.* before 8.2.31
PHP Group PHPfrom 8.3.* before 8.3.31
PHP Group PHPfrom 8.4.* before 8.4.21
PHP Group PHPfrom 8.5.* before 8.5.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12php8.28.2.31-1~deb12u1DEBIAN-CVE-2025-14179 DSA-6255-1
Debian13php8.48.4.21-1~deb13u1DEBIAN-CVE-2025-14179 DSA-6256-1
Debian14php8.48.4.21-1DEBIAN-CVE-2025-14179
Ubuntu22.04:LTSphp8.18.1.2-1ubuntu2.24UBUNTU-CVE-2025-14179
Ubuntu24.04:LTSphp8.38.3.6-0ubuntu0.24.04.9UBUNTU-CVE-2025-14179
Ubuntu25.10php8.48.4.11-1ubuntu1.2UBUNTU-CVE-2025-14179
Ubuntu26.04:LTSphp8.58.5.4-0ubuntu1.1UBUNTU-CVE-2025-14179
UbuntuPro:14.04:LTSphp5no fix listedUBUNTU-CVE-2025-14179
UbuntuPro:16.04:LTSphp7.07.0.33-0ubuntu0.16.04.16+esm19UBUNTU-CVE-2025-14179 USN-8513-1
UbuntuPro:18.04:LTSphp7.2no fix listedUBUNTU-CVE-2025-14179
UbuntuPro:20.04:LTSphp7.4no fix listedUBUNTU-CVE-2025-14179
openSUSETumbleweedphp88.5.6-1.1openSUSE-SU-2026:10747-1
Azure Linux3php8.3.31-1AZL-86358
Alpaquita23php818.1.34-r1BELL-CVE-2025-14179
Alpaquita25, streamphp838.3.31-r0BELL-CVE-2025-14179

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This issue can be exploited in applications using the PDO Firebird driver. The application must construct dynamic queries using `PDO::quote()` and the query structure must contain subsequent string boundaries or parameters. This allows an attacker to inject a malicious payload, resulting in the execution of arbitrary database commands. Additionally, the use of `PDO::quote()` for manual concatenation is heavily discouraged and considered a legacy anti-pattern. Modern PHP applications use native prepared statements (`$stmt->execute()`) that are not vulnerable to this issue, limiting its exposure. Due to these reasons, this vulnerability has been rated with an important severity.

Red Hat's mitigation

To mitigate this issue, do not use 'PDO::quote()' for manual query concatenation. Refactor the application to use native parameterized prepared statements. Additionally, implement an input validation mechanism to reject any user-supplied data containing control characters, specifically the NUL byte (\x00).

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10phpAffected
Red Hat Enterprise Linux 10php8.4Not affected
Red Hat Enterprise Linux 6phpNot affected
Red Hat Enterprise Linux 7phpNot affected
Red Hat Enterprise Linux 8php:7.4/phpNot affected
Red Hat Enterprise Linux 8php:8.2/phpNot affected
Red Hat Enterprise Linux 9phpNot affected
Red Hat Enterprise Linux 9php:8.2/phpNot affected
Red Hat Enterprise Linux 9php:8.3/phpNot affected
Red Hat Hardened ImagesphpNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-14179.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON