PT-2022-7564 · Unknown+12 · Pdo Sqlite+12

Cmb

·

Published

2022-10-29

·

Updated

2025-08-11

·

CVE-2022-31631

CVSS v3.1

9.1

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions PHP versions 8.0.* through 8.0.26 PHP versions 8.1.* through 8.1.14 PHP versions 8.2.* through 8.2.1
Description The issue occurs due to an uncaught integer overflow in the PDO::quote() function of PDO SQLite, which can return an improperly quoted string when called on user-supplied input without length restrictions. This can lead to SQL injection vulnerabilities, allowing attackers to inject malicious code and potentially gain control. The vulnerability affects multiple versions of PHP and poses a significant risk to websites and applications relying on the PHP Data Objects (PDO) extension for SQLite database interactions.
Recommendations Update to PHP version 8.0.27 or later to fix the PDO/SQLite issue. Update to PHP version 8.1.15 or later to fix the PDO/SQLite issue. Update to PHP version 8.2.2 or later to fix the PDO/SQLite issue. As a temporary workaround, consider restricting the use of the PDO::quote() function until a patch is available. Avoid using the PDO::quote() function with user-supplied input without proper length restrictions in place.

Exploit

Fix

Special Elements Injection

Integer Overflow

Weakness Enumeration

Related Identifiers

ALSA-2023:0848
ALSA-2023:0965
ALSA-2023:2417
ALSA-2023:2903
ALT-PU-2023-1021
ALT-PU-2023-1026
ALT-PU-2023-1058
ALT-PU-2023-1063
ALT-PU-2023-1112
BDU:2024-07320
BIT-LIBPHP-2022-31631
BIT-PHP-2022-31631
BIT-PHP-MIN-2022-31631
CESA-2023_0848
CESA-2023_2903
CVE-2022-31631
DLA-3345-1
DSA-5363-1
MGASA-2023-0013
OESA-2023-1619
OESA-2023-1620
OESA-2023-1621
OESA-2023-1622
OPENSUSE-SU-2023_0073-1
OPENSUSE-SU-2023_0074-1
OPENSUSE-SU-2023_0084-1
OPENSUSE-SU-2024:12601-1
RHSA-2023:0848
RHSA-2023:0965
RHSA-2023:2417
RHSA-2023:2903
RHSA-2023_0848
RHSA-2023_0965
RHSA-2023_2417
RHSA-2023_2903
RLSA-2023:0848
RLSA-2023:0965
SUSE-SU-2023:0072-1
SUSE-SU-2023:0073-1
SUSE-SU-2023:0074-1
SUSE-SU-2023:0084-1
SUSE-SU-2023:0476-1
SUSE-SU-2023_0073-1
SUSE-SU-2023_0074-1
SUSE-SU-2023_0084-1
SUSE-SU-2023_0476-1
USN-5818-1
USN-5905-1

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Linuxmint
Pdo
Pdo Sqlite
Php
Red Hat
Rocky Linux
Sqlite
Suse
Ubuntu