PHPApplication

CVE-2025-14179

CRITICAL · 9.8 CVSS v3.1 Published 2026-05-10
Fix available
A fix is available. Upgrade to 8.2.31 / 8.3.31 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The PDO Firebird driver in PHP fails to properly handle NUL bytes during SQL query preparation. When a string token containing a NUL byte is processed via strncat(), the operation stops at the NUL character, dropping the closing quote and causing subsequent SQL tokens to be interpreted as part of the string. This enables SQL injection when attacker-controlled input is quoted using PDO::quote() and embedded in queries.

MitigationUpgrade PHP to version 8.2.31, 8.3.31, 8.4.21, or 8.5.6 or later. If immediate patching is not possible, avoid using PDO::quote() with Firebird driver for untrusted input and validate/sanitize all user data before query embedding.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
PHPApplication
Affected:>= 8.2.0, < 8.2.31>= 8.3.0, < 8.3.31>= 8.4.0, < 8.4.21>= 8.5.0, < 8.5.6

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed PHP version
    Run `php -v` or `phpinfo()` to display the PHP version. Look for the version number in the output (for example, 8.3.20 or 8.4.15).
    Affected if The version is 8.2.0 to 8.2.30, 8.3.0 to 8.3.30, 8.4.0 to 8.4.20, or 8.5.0 to 8.5.5.
  2. Verify Firebird PDO extension is loaded
    Run `php -m` or check the output of `phpinfo()` for the module named 'pdo_firebird'.
    Affected if The pdo_firebird module appears in the loaded modules list.
  3. Check for active Firebird database connections
    Review application configuration files, PHP scripts, or environment variables for PDO DSN strings beginning with 'firebird:' (for example, `$db = new PDO('firebird:...')`).
    Affected if The application connects to a Firebird database using PDO.
  4. Identify use of PDO::quote() with Firebird
    Search source code files for patterns like `PDO::quote(` or `$pdo->quote(` in scripts that perform Firebird database operations.
    Affected if Code uses PDO::quote() to escape user-supplied values before embedding them in SQL queries against a Firebird database.

You are affected if your PHP version falls within the vulnerable ranges AND the pdo_firebird extension is loaded AND your application uses PDO::quote() to sanitize untrusted input in Firebird SQL queries.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 8.2.31 / 8.3.31 / 8.4.21 or later
Fixed in 8.2.318.3.318.4.21
Interim mitigation

Upgrade PHP to version 8.2.31, 8.3.31, 8.4.21, or 8.5.6 or later. If immediate patching is not possible, avoid using PDO::quote() with Firebird driver for untrusted input and validate/sanitize all user data before query embedding.

Recommended fix High confidence

PHP 8.2.31, 8.3.31, 8.4.21, or 8.5.6 (depending on your current minor version branch)

  1. 1. Identify the current PHP version by running `php -v`
  2. 2. Determine which upgrade path applies based on your current version (8.2.x → 8.2.31, 8.3.x → 8.3.31, 8.4.x → 8.4.21, or 8.5.x → 8.5.6)
  3. 3. Update your package manager repository to fetch the latest PHP packages
  4. 4. Run the appropriate upgrade command for your system (e.g., `apt update && apt install php` for Debian/Ubuntu, or `yum update php` for RHEL/CentOS)
  5. 5. Verify the upgrade was successful by running `php -v` and confirming the version matches the target fixed release
  6. 6. If using the Firebird PDO driver, test your application to confirm SQL queries with quoted values function correctly
  7. 7. Restart any PHP-FPM or web server services to ensure the new PHP version is loaded
Caveat Minor version upgrades within the same PHP major version typically have minimal breaking changes; however, review the PHP release notes for your target version for any deprecated functions or behavior changes

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in PHP Scoped from the published advisory
  • Consultation4.0 h
  • Implementation4.0 h
  • Testing4.0 h
  • Review / QA2.0 h
14.0 hours of engineering $2,480
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,968.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-14179 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-14179 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data