{"id":"CVE-2021-45985","details":"In Lua 5.4.3, an erroneous finalizer called during a tail call leads to a heap-based buffer over-read.","aliases":["BIT-lua-2021-45985"],"modified":"2026-07-09T01:24:53.683266Z","published":"2023-04-10T09:15:07.250Z","references":[{"type":"ADVISORY","url":"https://www.lua.org/bugs.html#5.4.3-11"},{"type":"FIX","url":"https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5"},{"type":"EVIDENCE","url":"http://lua-users.org/lists/lua-l/2021-12/msg00019.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/lua/lua","events":[{"introduced":"c33b1728aeb7dfeec4013562660e07d32697aa6b"},{"fixed":"5d708c3f9cae12820e415d4f89c9eacbe2ab964b"},{"fixed":"cf613cdc6fa367257fc61c256f63d917350858b5"}],"database_specific":{"cpe":"cpe:2.3:a:lua:lua:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"5.4.0"},{"fixed":"5.4.4"}],"source":["CPE_RANGE","REFERENCES"]}}],"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_modified":"2026-07-09T01:24:53Z","vanir_signatures":[{"target":{"file":"ldo.c"},"deprecated":false,"digest":{"line_hashes":["33833490466441759291322153683438719705","84369104082086107190645463707502174029","295511310105421369746384700970995315737","12203473177769128110561359607199773707","315007898064505767868322756796827846696","278707840460729215257930947771055151307","289853073820757707898851752461450092833","79699182784658544092265369729132165017"],"threshold":0.9},"id":"CVE-2021-45985-607c555b","signature_type":"Line","signature_version":"v1","source":"https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5"},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/lua/lua/commit/cf613cdc6fa367257fc61c256f63d917350858b5","target":{"function":"luaD_pretailcall","file":"ldo.c"},"deprecated":false,"digest":{"function_hash":"74565152130787818120172892330726743781","length":1036},"id":"CVE-2021-45985-fe306226"}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}