Every CVE Search/ Get API key

CVE-2021-45985

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

7.5 HighFix available

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

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

1.42%Up 1.4 points since Apr 11, 2023
90%50%10%1%

What each source reports

NVD Score used 7.5

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

Record
CVE-2021-45985
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-787
Updated
2026-11-02
CVE List 7.5

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

Record
CVE-2021-45985
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-787
Updated
2026-11-02
EUVDEUVD-2021-32691 7.5

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

Record
EUVD-2021-32691
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-pxvf-cp3x-784h 7.5

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

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

Record
GHSA-pxvf-cp3x-784h
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-787
Updated
2026-11-02
OSVAZL-26047 7.5

CVE-2021-45985 affecting package lua for versions less than 5.4.3-5

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

Record
AZL-26047
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVAZL-26155 7.5

CVE-2021-45985 affecting package memcached for versions less than 1.6.13-3

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

Record
AZL-26155
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 9 moreShow less
OSVAZL-26158 7.5

CVE-2021-45985 affecting package ntopng for versions less than 5.2.1-2

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

Record
AZL-26158
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVAZL-35066 7.5

CVE-2021-45985 affecting package ntopng for versions less than 5.2.1-2

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

Record
AZL-35066
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-05
OSV 7.5

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

Record
CVE-2021-45985
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-45985 7.5

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

Record
DEBIAN-CVE-2021-45985
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVJLSEC-2026-559 7.5

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

Record
JLSEC-2026-559
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2023-1241 7.5

lua security update

Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.

Security Fix(es):

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

Record
OESA-2023-1241
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2023-1242 7.5

lua security update

Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.

Security Fix(es):

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

Record
OESA-2023-1242
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-45985 7.5

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

Record
UBUNTU-CVE-2021-45985
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVBIT-lua-2021-45985 No score

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

Record
BIT-lua-2021-45985
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
lua
Azure Linux:2
before 5.4.3-5
5.4.3-5
memcached
Azure Linux:2
before 1.6.13-3
1.6.13-3
ntopng
Azure Linux:2
before 5.2.1-2
5.2.1-2
ntopng
Azure Linux:3
before 5.2.1-2
5.2.1-2
lua
Bitnami
5.4.0 up to 5.4.4
5.4.4
lua5.4
Debian:12
before 5.4.4-1
5.4.4-1
lua5.4
Debian:13
before 5.4.4-1
5.4.4-1
lua5.4
Debian:14
before 5.4.4-1
5.4.4-1
Lua_jll
Julia
5.4.3+0 up to 5.4.4+0
5.4.4+0
lua
openEuler:22.03-LTS
before 5.4.3-11.oe2203
5.4.3-11.oe2203
Show 23 moreShow less
Affected packages
PackageAffectedFixed
lua
openEuler:22.03-LTS-SP1
before 5.4.3-11.oe2203sp1
5.4.3-11.oe2203sp1
darktable
Ubuntu:16.04:LTS
All versions, plus listed versions
1.6.8-11.6.9-12.0.0-12.0.1-12.0.3-1
None known
vifm
Ubuntu:16.04:LTS
All versions, plus listed versions
0.7.8-30.7.8-3build1
None known
darktable
Ubuntu:18.04:LTS
All versions, plus listed versions
2.2.5-22.4.0-12.4.1-12.4.2-1
None known
vifm
Ubuntu:18.04:LTS
All versions, plus listed versions
0.9-10.9.1-1
None known
darktable
Ubuntu:20.04:LTS
All versions, plus listed versions
2.6.0-12.6.2-32.6.3-12.6.3-1build12.6.3-1build23.0.1-0ubuntu1
None known
tup
Ubuntu:20.04:LTS
All versions, plus listed versions
0.7.8-3
None known
vifm
Ubuntu:20.04:LTS
All versions, plus listed versions
0.10.1-20.10.1-3
None known
darktable
Ubuntu:22.04:LTS
All versions, plus listed versions
3.6.0-0ubuntu13.8.0-23.8.0-33.8.0-3build13.8.0-3build23.8.1-13.8.1-2
None known
tup
Ubuntu:22.04:LTS
All versions, plus listed versions
0.7.8-3
None known
vifm
Ubuntu:22.04:LTS
All versions, plus listed versions
0.10.1-40.12-1
None known
darktable
Ubuntu:24.04:LTS
All versions, plus listed versions
4.4.2-1ubuntu14.4.2-1ubuntu24.4.2-1.14.4.2-1.1build14.6.1-24.6.1-2build34.6.1-2build44.6.1-2ubuntu1
None known
tup
Ubuntu:24.04:LTS
All versions, plus listed versions
0.7.11-30.7.11-4
None known
vifm
Ubuntu:24.04:LTS
All versions, plus listed versions
0.12-10.12-1build10.12-1build2
None known
darktable
Ubuntu:25.10
All versions, plus listed versions
5.0.1-0ubuntu15.0.1-0ubuntu25.0.1-15.0.1-2
None known
tup
Ubuntu:25.10
All versions, plus listed versions
0.8-10.8-1build1
None known
vifm
Ubuntu:25.10
All versions, plus listed versions
0.12-1build20.14-3
None known
darktable
Ubuntu:26.10
All versions, plus listed versions
5.4.1-15.4.1-1build15.4.1-1build2
None known
tup
Ubuntu:26.10
All versions, plus listed versions
0.8-5
None known
vifm
Ubuntu:26.10
All versions, plus listed versions
0.14.3-10.14.3-30.14.4-1
None known
darktable
Ubuntu:26.04:LTS
All versions, plus listed versions
5.0.1-25.2.1-15.2.1-1build15.2.1-1build25.4.0-15.4.1-1
None known
tup
Ubuntu:26.04:LTS
All versions, plus listed versions
0.8-1build10.8-30.8-40.8-5
None known
vifm
Ubuntu:26.04:LTS
All versions, plus listed versions
0.14-30.14.3-1
None known

History

History
RecordedChangedSources
factsOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-45985 is a high vulnerability (CVSS 7.5) in Lua, published April 10, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.42%, the 72nd percentile. Fixed in lua 5.4.3-5.

References

Show 4 moreShow less
MoveEnter Open