High
Security advisory
In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-45985
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:37 UTC · Revision 1
Source evidence
In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.
osv:CVE-2021-45985
Complete source record
{
"id": "011eae4b0288ecca3a145ad16bdc8d7b9cdab1aa5cc5612e1da95511f623d0fd",
"url": "https://osv.dev/vulnerability/CVE-2021-45985",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-45985",
"summary": "In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.",
"evidence": "osv:CVE-2021-45985",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-45985",
"aliases": [
"BIT-lua-2021-45985",
"CVE-2021-45985"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/lua/lua",
"type": "GIT",
"events": [
{
"introduced": "c33b1728aeb7dfeec4013562660e07d32697aa6b"
},
{
"fixed": "5d708c3f9cae12820e415d4f89c9eacbe2ab964b"
},
{
"fixed": "cf613cdc6fa367257fc61c256f63d917350858b5"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:lua:lua:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.4.0"
},
{
"fixed": "5.4.4"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "cf613cdc6fa367257fc61c256f63d917350858b5"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v5.4.3",
"v5.4.2",
"v5.4.1",
"v5.4.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-45985.json",
"vanir_signatures": [
{
"id": "CVE-2021-45985-607c555b",
"digest": {
"threshold": 0.9,
"line_hashes": [
"33833490466441759291322153683438719705",
"84369104082086107190645463707502174029",
"295511310105421369746384700970995315737",
"12203473177769128110561359607199773707",
"315007898064505767868322756796827846696",
"278707840460729215257930947771055151307",
"289853073820757707898851752461450092833",
"79699182784658544092265369729132165017"
]
},
"source": "https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5",
"target": {
"file": "ldo.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2021-45985-fe306226",
"digest": {
"length": 1036,
"function_hash": "74565152130787818120172892330726743781"
},
"source": "https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5",
"target": {
"file": "ldo.c",
"function": "luaD_pretailcall"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:06:56Z"
}
}
],
"modified": "2026-10-20T14:06:56.937048640Z",
"provider": "osv",
"references": [
"https://www.lua.org/bugs.html#5.4.3-11",
"https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-45985",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388571,
"published_at": "2023-04-10T09:15:07.25+00:00"
}