CVE-2021-45985 json
In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.
published 2023-04-10 3 y ago modified 2026-09-08 2 mo ago also BIT-lua-2021-45985 , EUVD-2021-32691 , JLSEC-2026-559
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 72%
- public exploits
- 0
- none known
Summary
In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.
Patch / fix
- bitnami lua 5.4.4
- julia Lua_jll 5.4.4+0
- lua lua 5.4.4
- lua5.4 Debian 14, Debian 13, Debian 12 5.4.4-1
debian advisories DEBIAN-CVE-2021-45985
- lua CBL-Mariner 2.0 5.4.3-5
- memcached CBL-Mariner 2.0 1.6.13-3
- ntopng CBL-Mariner 2.0, Azure Linux 3.0 5.2.1-2
azure linux advisories AZL-26047AZL-26155AZL-26158AZL-35066
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- github.com/lua/lua@cf613cd commit
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-45985 updated cvss 7.5
lua: heap-based buffer over-read
-
Red Hat Enterprise Linux 6 lua Red Hat Enterprise Linux 7 lua Red Hat Enterprise Linux 8 lua, lua-libs Red Hat Enterprise Linux 9 lua, lua-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 SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 20 mo ago
Exploit prediction
1.42% chance of exploitation in the next 30 days, higher than 72% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- lua-users.org http://lua-users.org/lists/lua-l/2021-12/msg00019.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | lua | >=5.4.0, <5.4.4 |
5.4.4 |
| julia | Lua_jll | >=5.4.3+0, <5.4.4+0 |
5.4.4+0 |
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
References
-
github.com
/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5
patch, web
-
lua-users.org
/lists/lua-l/2021-12/msg00019.html
exploit, mailing-list, vendor-advisory, advisory, web
-
lua.org
/bugs.html#5.4.3-11
vendor-advisory, advisory, web
-
nvd.nist.gov
/vuln/detail/CVE-2021-45985
web
Sources
- CVE List CVE-2021-45985
- NVD CVE-2021-45985
- OSV BIT-lua-2021-45985
- OSV JLSEC-2026-559
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.