What’s Vulnerable › Vulnerabilities
CVE-2021-45985
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2023-04-10 · updated 2026-06-17
- Weakness: CWE-787
Description
In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.
Affected products
- Lua: from 5.4.0 before 5.4.4 — fixed in 5.4.4
How to fix
Upgrade to a fixed version: Lua 5.4.4. Check the vendor advisory for mitigations.
References
- http://lua-users.org/lists/lua-l/2021-12/msg00019.html
- https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5
- https://www.lua.org/bugs.html#5.4.3-11
- http://lua-users.org/lists/lua-l/2021-12/msg00019.html
- https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5
- https://www.lua.org/bugs.html#5.4.3-11
Get alerted when CVE-2021-45985 or the next vulnerability affects your stack