CVE-2022-31631: PDO::quote() may return unquoted string
Vulnerability summary
CVE-2022-31631 is a critical (CVSS 9.1) vulnerability in php group php. EPSS estimates a 2.19% chance of exploitation in the next 30 days, higher than 82.4% of scored vulnerabilities.
Severe, CVSS 9.1 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 2% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 9 · Related 3Timeline
- 12-02-2025PublishedVulnerability first disclosed.
- 13-02-2025Last modifiedVulnerability information updated.
Description
In PHP versions 8.0.* before 8.0.27, 8.1.* before 8.1.15, 8.2.* before 8.2.2 when using PDO::quote() function to quote user-supplied data for SQLite, supplying an overly long string may cause the driver to incorrectly quote the data, which may further lead to SQL injection vulnerabilities.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- OSV · DebianEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- OSV · WolfiEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- OSV · ChainguardEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- NVDNIST9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- OSV · AlpineEcosystem advisory · calculated9.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS trend
Probability
2.19%
Chance of exploitation in the next 30 days
Percentile
82%
Versus all other CVEs
30-day change
Increase +0.02 pp
From 2.17% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Suse15 products
- apache2-mod_php7&distro=SUSE Linux Enterprise Module for Legacy 15 SP4< 7.4.33-150400.4.16.1
- apache2-mod_php8&distro=SUSE Linux Enterprise Module for Web and Scripting 15 SP4< 8.0.27-150400.4.23.1
- php7-embed&distro=SUSE Linux Enterprise Module for Package Hub 15 SP4< 7.4.33-150400.4.16.1
- php7-fastcgi&distro=SUSE Linux Enterprise Module for Legacy 15 SP4< 7.4.33-150400.4.16.1
- php7-fpm&distro=SUSE Linux Enterprise Module for Legacy 15 SP4< 7.4.33-150400.4.16.1
Opensuse13 products
- apache2-mod_php7&distro=openSUSE Leap 15.4< 7.4.33-150400.4.16.1
- apache2-mod_php8&distro=openSUSE Leap 15.4< 8.0.27-150400.4.23.1
- php7-embed&distro=openSUSE Leap 15.4< 7.4.33-150400.4.16.1
- php7-fastcgi&distro=openSUSE Leap 15.4< 7.4.33-150400.4.16.1
- php7-fpm&distro=openSUSE Leap 15.4< 7.4.33-150400.4.16.1
Ubuntu5 products
- php5All versions (No fix recorded)
- php7.0< 7.0.33-0ubuntu0.16.04.16+esm5
- php7.2< 7.2.24-0ubuntu0.18.04.16
- php7.4< 7.4.3-4ubuntu2.17
- php8.1< 8.1.2-1ubuntu2.10
Alpine3 products
- php8< 8.0.27-r0
- php81< 8.1.14-r0
- php82< 8.2.1-r0
Chainguard1 product
- sqliteAll versions (No fix recorded)
Debian1 product
- php8.2< 8.2.1-1
Mageia1 product
- php< 8.0.27-1.mga8
Php1 product
- php≥ 8.0.0, < 8.0.27 | ≥ 8.1.0, < 8.1.15 | ≥ 8.2.0, < 8.2.2
Php group1 product
- php≥ 8.0.x, < 8.0.27 | ≥ 8.1.x, < 8.1.15 | ≥ 8.2.x, < 8.2.2
Wolfi1 product
- sqliteAll versions (No fix recorded)
10 vendors · 42 products