9.1critical
PDO::quote() may return unquoted string
- Severity
- 9.1critical CVSS:3.1 by php
- Exploit likelihood
- 2.14% (higher than 82% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- php
- Also known as
- BIT-LIBPHP-2022-31631BIT-PHP-2022-31631BIT-PHP-MIN-2022-31631
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| pdo_sqlite | from 8.0.x before 8.0.27, from 8.1.x before 8.1.15, from 8.2.x before 8.2.2 | CVE List |
| php php | from 8.0.0 before 8.0.27, from 8.1.0 before 8.1.15, from 8.2.0 before 8.2.2 | NVD |
| libphp (Bitnami) | from 8.0.0 before 8.0.27, from 8.1.0 before 8.1.15, from 8.2.0 before 8.2.2 | Bitnami Vulnerability Database |
| php (Bitnami) | from 8.0.0 before 8.0.27, from 8.1.0 before 8.1.15, from 8.2.0 before 8.2.2 | Bitnami Vulnerability Database |
| php-min (Bitnami) | from 8.0.0 before 8.0.27, from 8.1.0 before 8.1.15, from 8.2.0 before 8.2.2 | Bitnami Vulnerability Database |
All scores
| php | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| Bitnami Vulnerability Database | critical rating |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
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.
NVD (es)
En las versiones de PHP 8.0.* anteriores a 8.0.27, 8.1.* anteriores a 8.1.15, 8.2.* anteriores a 8.2.2, cuando se usa la función PDO::quote() para citar datos proporcionados por el usuario para SQLite, proporcionar una cadena demasiado larga puede provocar que el controlador cite incorrectamente los datos, lo que puede generar vulnerabilidades de inyección SQL.
References
| https://bugs.php.net/bug.php?id=81740 | advisory, exploit, vendor-advisory | |
| https://security.netapp.com/advisory/ntap-20230223-0007/ | advisory, third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-31631 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31631 changed 2025-02-13 | CVE Terms of Use |
| NVD | CVE-2022-31631 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPHP-2022-31631 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-2022-31631 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-MIN-2022-31631 changed 2026-09-08 | Apache-2.0 |