CVE-2021-45985
A public proof of concept exists; no exploitation attested.
- Published2023-04-10
- Fixed in5.4.4
- WeaknessCWE-787
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.
Timeline
dates in UTC- 2023-04-1009:15CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 5.4 | ≥ 5.4.0, < 5.4.4 | 5.4.4 | NVD · OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- luaopenEuler:22.03-LTS-SP1all versions · fixed in 5.4.3-11.oe2203sp1
- luaopenEuler:22.03-LTSall versions · fixed in 5.4.3-11.oe2203
- luaAzure Linux:2all versions · fixed in 5.4.3-5
- lua5.4Debian:14all versions · fixed in 5.4.4-1
- lua5.4Debian:13all versions · fixed in 5.4.4-1
- lua5.4Debian:12all versions · fixed in 5.4.4-1
- memcachedAzure Linux:2all versions · fixed in 1.6.13-3
- ntopngAzure Linux:3all versions · fixed in 5.2.1-2
9 more package ranges on OSV.dev
Vendor advisories
- CVE-2021-45985 Red Hat Product Security
lua: heap-based buffer over-read
Fix
- Update Lua to 5.4.4
Advisories and patches
- lua-users.orgVendor Advisory
- github.comPatch
- www.lua.orgVendor Advisory
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- CISA-ADP (SSVC)PoC stated2025-02-12
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionpoc2025-02-12
- CISA-ADPCVSS 3.17.52025-02-12
- NVDCVSS 3.17.5read 2026-10-23
- CISA-ADPweakness (CWE)CWE-7872025-02-12
- NVDweakness (CWE)CWE-787read 2026-10-23
- FIRST EPSSEPSS score1.4 %2026-11-08
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-26047same flawAzure Linux · MIT
- AZL-26155same flawAzure Linux · MIT
- AZL-26158same flawAzure Linux · MIT
- AZL-35066same flawAzure Linux · MIT
- BIT-lua-2021-45985same flawBitnami · Apache-2.0
- EUVD-2021-32691same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-pxvf-cp3x-784hsame flawGitHub Advisory Database · CC-BY-4.0
- JLSEC-2026-559same flawJulia Security Advisories · CC-BY-4.0
- OESA-2023-1241advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2023-1242advisory covering several CVEsopenEuler · LicenseRef-unstated
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Published
- 2023-04-10
- Last Modified
- 2026-06-17
- NVD status
- Analyzed
- GitHub Advisory
- GHSA-pxvf-cp3x-784h
Frequently asked questions
What is CVE-2021-45985?
Is CVE-2021-45985 actively exploited?
What is the CVSS score for CVE-2021-45985?
Running lua? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-pxvf-cp3x-784h
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0