PHP 8.2.x < 8.2.1 SQL Injection

critical Web App Scanning Plugin ID 113513

Synopsis

PHP 8.2.x < 8.2.1 SQL Injection

Description

According to its self-reported version number, the version of PHP installed on the remote host is 8.0.x prior to 8.0.27, 8.1.x prior to 8.1.14, or 8.2.x prior to 8.2.1. It is, therefore, affected by a SQL injection vulnerability:

- When using the 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. (CVE-2022-31631)

Note that the scanner has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to PHP version 8.2.1 or later.

See Also

http://php.net/ChangeLog-8.php#8.2.1

Plugin Details

Severity: Critical

ID: 113513

Type: Version Based

Published: 1/10/2023

Updated: 4/19/2023

Scan Template: api, basic, full, pci, quick, scan

Risk Information

VPR

Risk Factor: Medium

Score: 4.3

Percentile: 53.37

CVSS v2

Risk Factor: High

Base Score: 9.4

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:N

CVSS Score Source: CVE-2022-31631

CVSS v3

Risk Factor: Critical

Base Score: 9.1

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

CVSS Score Source: CVE-2022-31631

Vulnerability Information

CPE: cpe:2.3:a:php:php:*:*:*:*:*:*:*:*

Exploit Ease: No known exploits are available

Patch Publication Date: 1/5/2023

Vulnerability Publication Date: 1/3/2023

Reference Information

CVE: CVE-2022-31631