CVE-2021-20227: A flaw was found in SQLite's SELECT query functionality (src/select.c).
Noroxi assessment
Priority: Monitor (action score 22/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.65% (FIRST EPSS); higher than 51.7% of all records.
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: sqlite (Alpine:v3.12) 3.32.1-r1; sqlite (Alpine:v3.14) 3.34.1-r0; sqlite3 (Debian:12) 3.34.1-1.
- Mentioned 2 times in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Low priority for now. Upgrade to sqlite (Alpine:v3.12) 3.32.1-r1; sqlite (Alpine:v3.14) 3.34.1-r0; sqlite3 (Debian:12) 3.34.1-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Mar 23, 2021
- Updated
- Oct 14, 2026
- EPSS
- 0.6% · 51th percentile
- CWE
- CWE-416
Report tools
Action score
22
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.6%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| sqlite | sqlite | cpe:2.3:a:sqlite:sqlite |
| oracle | communications network charging and control | cpe:2.3:a:oracle:communications_network_charging_and_control |
| oracle | enterprise manager for oracle database | cpe:2.3:a:oracle:enterprise_manager_for_oracle_database |
| oracle | jd edwards enterpriseone tools | cpe:2.3:a:oracle:jd_edwards_enterpriseone_tools |
| oracle | mysql workbench | cpe:2.3:a:oracle:mysql_workbench |
| oracle | outside in technology | cpe:2.3:a:oracle:outside_in_technology |
| oracle | zfs storage appliance kit | cpe:2.3:a:oracle:zfs_storage_appliance_kit |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (redhat). Independent of NVD's CPE analysis and usually ahead of it.
n/a sqlite
- sqlite 3.34.1affected
Affected versions · NVD (8)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- oracle communications network charging and control12.0.1.0 and later · up to 12.0.4.0.0 inclusive
- oracle communications network charging and control6.0.1
- oracle enterprise manager for oracle database13.4.0.0
- oracle jd edwards enterpriseone toolsbefore 9.2.6.0
- oracle mysql workbenchup to 8.0.26 inclusive
- oracle outside in technology8.5.5
- oracle zfs storage appliance kit8.8
- sqlite sqlite3.33.0 and later · before 3.34.1
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.12 | sqlite | from 3.33.0 · before 3.32.1-r1 | 3.32.1-r1 |
| Alpine:v3.14 | sqlite | from 3.33.0 · before 3.34.1-r0 | 3.34.1-r0 |
| Debian:12 | sqlite3 | before 3.34.1-1 | 3.34.1-1 |
Same product
sqlite: all recordsOther highest-scoring records for the same primary product.
- CVE-2019-8457SQLite3 from 3.6.0 to and including 3.27.2 is vulnerable to heap out-of-bound read in the rtreenode() function when handling invalid rtree…53Plan
- CVE-2025-6965Integer Truncation on SQLite50Plan
- CVE-2015-5895Multiple unspecified vulnerabilities in SQLite before 3.8.10.2, as used in Apple iOS before 9, have unknown impact and attack vectors.43Plan
Published before and after this one in the same product
- ← EarlierCVE-2020-13871Jun 6, 2020 · SQLite 3.32.2 has a use-after-free in resetAccumulator in select.c because the parse tree rewrite for window functions is too late.31Monitor
- ← EarlierCVE-2020-15358Jun 27, 2020 · In SQLite before 3.32.3, select.c mishandles query-flattener optimization, leading to a multiSelectOrderBy heap overflow because of misuse…22Monitor
- Later →CVE-2021-36690Aug 24, 2021 · A segmentation fault can occur in the sqlite3.exe command-line component of SQLite 3.36.0 via the idxGetTableInfo function when there is a…31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:sqlite | 3.32.1-r1 · Alpine:v3.12 | Package registry (OSV) |
| debian:sqlite3 | 3.34.1-1 · Debian:12 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-21-0852 · Oct 20, 2021(Oracle Ürünleri Güvenlik Zafiyeti)
- TR-21-0331 · Apr 21, 2021(Oracle Güvenlik Uyarısı Yayınladı)
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-416 · Use After FreeCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Root cause
After a memory region is freed, another reference pointing to it is still used. By then, the same region may have been allocated for different data.
The bug in code
The whole CWE-416 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
free(dev->buf);
/* ... another thread is still running ... */
process(dev->buf);Fixed
lock(&dev->lock);
free(dev->buf);
dev->buf = NULL;
unlock(&dev->lock);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (8 more)Show less
- security.gentoo.org/glsa/202103-04
- security.gentoo.org/glsa/202210-40
- security.netapp.com/advisory/ntap-20210423-0010/
- www.oracle.com//security-alerts/cpujul2021.html
- www.oracle.com/security-alerts/cpuApr2021.html
- www.oracle.com/security-alerts/cpuoct2021.html
- www.sqlite.org/releaselog/3_34_1.html
- cert-portal.siemens.com/productcert/html/ssa-398330.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.