# CVE-2022-31631: PDO::quote() may return unquoted string

- Severity: Critical 9.1 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.14%, higher than 82% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-02-12T22:10:45.418Z
- Modified: 2026-09-08T08:48:24.694Z
- Also known as: BIT-LIBPHP-2022-31631, BIT-PHP-2022-31631, BIT-PHP-MIN-2022-31631
- Weaknesses: CWE-74
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: php

## 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.

(As written by CVE List.)

## Affected

- pdo_sqlite: from 8.0.x before 8.0.27; from 8.1.x before 8.1.15; from 8.2.x before 8.2.2
- php php: from 8.0.0 before 8.0.27; from 8.1.0 before 8.1.15; from 8.2.0 before 8.2.2
- 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.2
- 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.2
- 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.2

## Every score

- php: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://bugs.php.net/bug.php?id=81740> (exploit, advisory, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20230223-0007/> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31631> (web)

## Sources

- CVE List: [CVE-2022-31631](https://www.cve.org/CVERecord?id=CVE-2022-31631), CVE Terms of Use, modified 2025-02-13
- NVD: [CVE-2022-31631](https://nvd.nist.gov/vuln/detail/CVE-2022-31631), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPHP-2022-31631](https://osv.dev/vulnerability/BIT-LIBPHP-2022-31631), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-2022-31631](https://osv.dev/vulnerability/BIT-PHP-2022-31631), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2022-31631](https://osv.dev/vulnerability/BIT-PHP-MIN-2022-31631), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-31631 · Whole record: https://cve.day/CVE-2022-31631.json · Rebuilt by cve.day 2026-11-25T22:58:20.106Z
