CVE-2022-31631
JSON

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 packageVersionsReported by
pdo_sqlitefrom 8.0.x before 8.0.27, from 8.1.x before 8.1.15, from 8.2.x before 8.2.2CVE List
php phpfrom 8.0.0 before 8.0.27, from 8.1.0 before 8.1.15, from 8.2.0 before 8.2.2NVD
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.2Bitnami 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.2Bitnami 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.2Bitnami Vulnerability Database

All scores

php9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Bitnami Vulnerability Databasecritical rating

Classification

CWE-74

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

Sources

SourceRecordLicence
CVE ListCVE-2022-31631 changed 2025-02-13CVE Terms of Use
NVDCVE-2022-31631 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-LIBPHP-2022-31631 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2022-31631 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2022-31631 changed 2026-09-08Apache-2.0