CVE-2021-20227 json
A flaw was found in SQLite's SELECT query functionality (src/select.c).
published 2021-03-23 5 y ago modified 2026-10-14 26 d ago also BIT-sqlite-2021-20227 , EUVD-2021-7667
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 51%
- public exploits
- 0
- none known
Summary
A flaw was found in SQLite's SELECT query functionality (src/select.c). This flaw allows an attacker who is capable of running SQL queries locally on the SQLite database to cause a denial of service or possible code execution by triggering a use-after-free. The highest threat from this vulnerability is to system availability.
Patch / fix
- bitnami sqlite 3.34.1
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP V3.1.5
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- sqlite3 Debian 14, Debian 13, Debian 12 3.34.1-1
debian advisories DEBIAN-CVE-2021-20227
- sqlite Alpine 3.12 3.32.1-r1
- sqlite Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 3.34.1-r0
alpine advisories ALPINE-CVE-2021-20227
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- sqlite Arch Linux 3.34.1-1
arch linux advisories AVG-1536
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-20227 updated cvss 6.1
sqlite: potential use-after-free bug when processing a subquery with both a correlated WHERE clause and a "HAVING 0" clause and where the parent query is an aggregate
-
Red Hat Enterprise Linux 6 lemon, sqlite, sqlite-tcl Red Hat Enterprise Linux 7 lemon, sqlite, sqlite-tcl Red Hat Enterprise Linux 8 lemon, sqlite, sqlite-libs Red Hat Enterprise Linux 9 sqlite, sqlite-libsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-23-348-10 updated cvss 5.5
Siemens SIMATIC S7-1500
-
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.0, < 3.1.5affected: fixed in V3.1.5, mitigation support.industry.siemens.com
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
Exploit prediction
0.65% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 2.1 | AV:L/AC:L/Au:N/C:N/I:N/A:P |
| OSV | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | sqlite | >=3.33.0, <3.34.1 |
3.34.1 |
Affected products
- n/a sqlite
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP
Classification
- Weakness
-
- CWE-416 Use After Free
References
-
oracle.com
/security-alerts/cpuApr2021.html
patch, third-party-advisory, advisory
-
oracle.com
//security-alerts/cpujul2021.html
patch, third-party-advisory, advisory
-
oracle.com
/security-alerts/cpuoct2021.html
patch, third-party-advisory, advisory
-
security.gentoo.org
/glsa/202103-04
vendor-advisory, third-party-advisory, advisory
-
security.gentoo.org
/glsa/202210-40
vendor-advisory, third-party-advisory, advisory
-
sqlite.org
/releaselog/3_34_1.html
release-notes, vendor-advisory, advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=1924886
issue-tracking, third-party-advisory, advisory
-
security.netapp.com
/advisory/ntap-20210423-0010/
third-party-advisory, advisory
- cert-portal.siemens.com /productcert/html/ssa-398330.html
-
nvd.nist.gov
/vuln/detail/CVE-2021-20227
web
Sources
- CVE List CVE-2021-20227
- NVD CVE-2021-20227
- OSV BIT-sqlite-2021-20227
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.