CVE-2022-31631
PDO::quote() may return unquoted string
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
A flaw was found in PHP. This issue occurs due to an uncaught integer overflow in PDO::quote() of PDO_SQLite returning an improperly quoted string. With the implementation of sqlite3_snprintf(), it is possible to force the function to return a single apostrophe if the function is called on user-supplied input without any length restrictions in place.
It was discovered that PHP incorrectly handled certain gzip files. An attacker could possibly use this issue to cause a denial of service. It was discovered that PHP incorrectly handled certain cookies. An attacker could possibly use this issue to compromise data integrity. It was discovered that PHP incorrectly handled certain inputs. An attacker could possibly use this issue to cause a crash or execute arbitrary code.
CVSS Scores
SSVC
- Decision:Attend
Timeline
- 2022-05-25 CVE Reserved
- 2023-01-23 CVE Published
- 2025-02-13 CVE Updated
- 2025-03-30 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
- CWE-190: Integer Overflow or Wraparound
CAPEC
References (4)
URL | Tag | Source |
---|---|---|
https://bugs.php.net/bug.php?id=81740 | ||
https://security.netapp.com/advisory/ntap-20230223-0007 |
|
URL | Date | SRC |
---|
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2022-31631 | 2023-05-16 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2158791 | 2023-05-16 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
PHP Group Search vendor "PHP Group" | PHP Search vendor "PHP Group" for product "PHP" | >= 8.0.0 < 8.0.27 Search vendor "PHP Group" for product "PHP" and version " >= 8.0.0 < 8.0.27" | en |
Affected
| ||||||
PHP Group Search vendor "PHP Group" | PHP Search vendor "PHP Group" for product "PHP" | >= 8.1.0 < 8.1.15 Search vendor "PHP Group" for product "PHP" and version " >= 8.1.0 < 8.1.15" | en |
Affected
| ||||||
PHP Group Search vendor "PHP Group" | PHP Search vendor "PHP Group" for product "PHP" | >= 8.2.0 < 8.2.2 Search vendor "PHP Group" for product "PHP" and version " >= 8.2.0 < 8.2.2" | en |
Affected
|