CVE-2022-31631

CVE-2022-31631 is a critical-severity vulnerability in Php with a CVSS 3.x base score of 9.1. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-74.

Key facts

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.

Frequently asked questions

What is CVE-2022-31631?
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.
How severe is CVE-2022-31631?
CVE-2022-31631 has a CVSS 3.x base score of 9.1, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability none.
Is CVE-2022-31631 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (80th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2022-31631?
CVE-2022-31631 affects Php. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2022-31631?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
Does CVE-2022-31631 have an EU (EUVD) identifier?
Yes. CVE-2022-31631 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2022-54225.
When was CVE-2022-31631 published?
CVE-2022-31631 was published on 2025-02-12 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Php

All CVEs affecting Php →

Other CWE-74 (Improper Neutralization of Special Elements (Injection)) vulnerabilities

Browse all CWE-74 (Improper Neutralization of Special Elements (Injection)) vulnerabilities →

Threat intelligence

Threat-intel indicators referencing this CVE: