# CVE-2021-45985: In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.

- Severity: High 7.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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.42%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-04-10T00:00:00.000Z
- Modified: 2026-09-08T08:48:09.071Z
- Also known as: BIT-LUA-2021-45985
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: mitre

## Description

In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- lua lua: from 5.4.0 before 5.4.4
- lua (Bitnami): from 5.4.0 before 5.4.4

## Every score

- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <http://lua-users.org/lists/lua-l/2021-12/msg00019.html> (exploit, advisory, mailing-list, vendor-advisory)
- <https://www.lua.org/bugs.html#5.4.3-11> (advisory, vendor-advisory)
- <https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5> (fix, patch)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-45985> (web)

## Sources

- CVE List: [CVE-2021-45985](https://www.cve.org/CVERecord?id=CVE-2021-45985), CVE Terms of Use, modified 2025-02-12
- NVD: [CVE-2021-45985](https://nvd.nist.gov/vuln/detail/CVE-2021-45985), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LUA-2021-45985](https://osv.dev/vulnerability/BIT-LUA-2021-45985), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-45985 · Whole record: https://cve.day/CVE-2021-45985.json · Rebuilt by cve.day 2026-11-25T22:58:08.401Z
