# CVE-2020-20120: SQL Injection in topthink/thinkphp

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- 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): 1.82%, higher than 79% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-09-28T22:05:09.000Z
- Modified: 2026-06-17T03:02:49.693Z
- Also known as: GHSA-m7h5-fjjq-559f
- Weaknesses: CWE-89
- Assigned by: mitre

## Description

ThinkPHP v3.2.3 and below contains a SQL injection vulnerability which is triggered when the array is not passed to the "where" and "query" methods.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- topthink/thinkphp (Packagist): up to 3.2.3
- thinkphp thinkphp: up to 3.2.3

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/top-think/thinkphp/issues/553> (exploit, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-20120> (advisory)
- <https://github.com/top-think/thinkphp> (package)

## Sources

- CVE List: [CVE-2020-20120](https://www.cve.org/CVERecord?id=CVE-2020-20120), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-m7h5-fjjq-559f](https://github.com/advisories/GHSA-m7h5-fjjq-559f), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2020-20120](https://nvd.nist.gov/vuln/detail/CVE-2020-20120), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2020-20120 · Whole record: https://cve.day/CVE-2020-20120.json · Rebuilt by cve.day 2026-11-25T22:57:58.405Z
