{"schema_version":"1.9.0","id":"CVE-2022-31631","published":"2025-02-12T22:10:45.418Z","modified":"2026-08-12T03:51:37.182585165Z","aliases":["BIT-libphp-2022-31631","BIT-php-2022-31631","BIT-php-min-2022-31631"],"related":["ALSA-2023:0848","ALSA-2023:0965","ALSA-2023:2417","ALSA-2023:2903","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","openSUSE-SU-2024:12601-1"],"summary":"PDO::quote() may return unquoted string","details":"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":[{"ranges":[{"type":"GIT","repo":"https://github.com/php/php-src","events":[{"introduced":"5dc92c2117cafc61daaaaa240fd46c3ac33872a4"},{"fixed":"f325ad215d0c9d1cc5cc533ca0819b0d57fe42a3"},{"introduced":"381ba9f5d0edd0c9c8ec1dea7e21d513ad08b115"},{"fixed":"010300fb6bcd7c8e755cb63f9af159927b7831e8"},{"introduced":"70ee6c20ad97e02c2b8098aeea96fefbbc3ac5c2"},{"fixed":"b20c0e925fe401a44a99b0d34b438797be865bb0"}],"database_specific":{"cpe":"cpe:2.3:a:php:php:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"8.0.0"},{"fixed":"8.0.27"},{"introduced":"8.1.0"},{"fixed":"8.1.15"},{"introduced":"8.2.0"},{"fixed":"8.2.2"}],"source":"CPE_RANGE"}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-31631.json"}}],"references":[{"type":"WEB","url":"https://bugs.php.net/bug.php?id=81740"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31631.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31631"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20230223-0007/"}],"database_specific":{"cna_assigner":"php","cwe_ids":["CWE-74"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31631.json","unresolved_ranges":[{"extracted_events":[{"introduced":"8.0.x"},{"fixed":"8.0.27"},{"introduced":"8.1.x"},{"fixed":"8.1.15"},{"introduced":"8.2.x"},{"fixed":"8.2.2"}],"source":"AFFECTED_FIELD"},{"extracted_events":[{"fixed":"8.0.27"},{"fixed":"8.1.15"},{"fixed":"8.2.2"}],"source":"DESCRIPTION"}]},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"}]}