CVE-2025-14179: SQL injection in pdo_firebird via NUL bytes in quoted strings
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.
Security readout for executives and security teams
Plain-English summary
A flaw in PHP's Firebird database driver can let an attacker alter database queries when applications quote attacker-supplied data with PDO::quote() and concatenate it into SQL. Impact can include unauthorized data access, data changes, or service disruption. It affects PHP 8.2, 8.3, 8.4, and 8.5 before the fixed releases.
Executive priority
Treat as high priority for any PHP service using Firebird through PDO. The business risk is database compromise, but exposure depends on a specific driver and coding pattern. Patch affected runtimes and quickly confirm whether the vulnerable component exists in production.
Technical view
pdo_firebird mishandles NUL bytes in quoted string tokens during prepared-query construction. Copying with strncat() truncates at the NUL byte, dropping the closing quote and changing how later SQL tokens are parsed. The issue is CWE-89 SQL injection with CVSS 8.1 and high confidentiality, integrity, and availability impact.
Likely exposure
Exposure is limited to PHP applications using the PDO Firebird driver, especially code that uses PDO::quote() on attacker-controlled values and embeds those values into SQL strings. PHP installations without pdo_firebird, without Firebird-backed data paths, or already on fixed versions are less likely exposed.
Exploitation context
The bundle does not show CISA KEV listing or cited evidence of active exploitation. The vulnerability is remotely reachable only through application paths that pass attacker-controlled input into vulnerable Firebird SQL construction. Attack complexity is rated high, but no privileges or user interaction are required.
Researcher notes
The key condition is attacker-controlled data quoted with PDO::quote() and then embedded into SQL processed by pdo_firebird. Evidence names fixed PHP versions and the parser truncation behavior. It does not provide proof of exploitation, distribution package status beyond referenced vendor tracking, or complete application-level preconditions.
Mitigation direction
Upgrade PHP to 8.2.31, 8.3.31, 8.4.21, 8.5.6, or later.
Prioritize systems running pdo_firebird with internet-facing input paths.
Replace PDO::quote() SQL string composition with bound parameters where feasible.
Check PHP and OS vendor advisories for distribution-specific packages.
Regression test Firebird-backed workflows after upgrading.
Validation and detection
Inventory PHP versions across production, staging, CI, and images.
Confirm whether the pdo_firebird extension is installed and enabled.
Search application code for PDO::quote() used in Firebird SQL construction.
Map findings to routes, jobs, or APIs accepting external input.
Verify patched PHP versions after package or runtime updates.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-89: Database access and collection lookup
Injection into data stores can inform collection, data access, and exfiltration detection reviews. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references database injection or access, so collection and exfiltration review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-89 · source CWE mapping
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.