CVE-2022-28805
singlevar in lparser.c in Lua through 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a...
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
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
- High
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.1
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
CVE-2022-28805- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - CVSS 2.0
- 6.4 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:P - Weakness
- CWE-125
- Updated
- 2026-11-02
CVE List No score
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
CVE-2022-28805- Updated
- 2026-11-02
EUVDEUVD-2022-33243 No score
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
EUVD-2022-33243- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-pxhp-rhgc-5jx8
9.1
singlevar in lparser.c in Lua through 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a...
singlevar in lparser.c in Lua through 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
GHSA-pxhp-rhgc-5jx8- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
OSVALPINE-CVE-2022-28805
9.1
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
ALPINE-CVE-2022-28805- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-03
OSVAZL-40812
9.1
CVE-2022-28805 affecting package ntopng for versions less than 5.2.1-3
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
AZL-40812- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-05
Show 11 moreShow less
OSVAZL-9333
9.1
CVE-2022-28805 affecting package lua for versions less than 5.4.3-2
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
AZL-9333- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVBELL-CVE-2022-28805
9.1
CVE-2022-28805 does not affect BellSoft software
- Record
BELL-CVE-2022-28805- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-28805
9.1
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
DEBIAN-CVE-2022-28805- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-03
OSVJLSEC-2026-560
9.1
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
JLSEC-2026-560- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - CVSS 2.0
- 6.4 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:P - Updated
- 2026-11-02
OSVOESA-2022-1632
9.1
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):
singlevar in lparser.c in Lua through 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.(CVE-2022-28805)
Lua 5.4.4 and 5.4.2 are affected by SEGV by type confusion in funcnamefromcode function in ldebug.c which can cause a local denial of service.(CVE-2021-44647)
- Record
OESA-2022-1632- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2023:2582
6.2
Red Hat Security Advisory: lua security update
- Record
RHSA-2023:2582- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-28805
9.1
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
UBUNTU-CVE-2022-28805- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVALSA-2023:2582 No score
Low: lua security update
The lua packages provide support for Lua, a powerful light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone language.
Security Fix(es):
- lua: heap buffer overread (CVE-2022-28805)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Additional Changes:
For detailed information on changes in this release, see the AlmaLinux Release Notes linked from the References section.
- Record
ALSA-2023:2582- Updated
- 2026-11-02
OSVBIT-lua-2022-28805 No score
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
BIT-lua-2022-28805- Updated
- 2026-11-02
OSV No score
singlevar in lparser.c in Lua from (including) 5.4.0 up to (excluding) 5.4.4 lacks a certain luaK_exp2anyregup call, leading to a heap-based buffer over-read that might affect a system that compiles untrusted Lua code.
- Record
CVE-2022-28805- Updated
- 2026-11-02
OSVUSN-6916-1 No score
lua5.4 vulnerabilities
It was discovered that Lua did not properly generate code when "_ENV" is constant. An attacker could possibly use this issue to cause a denial of service or execute arbitrary unstrusted lua code. (CVE-2022-28805)
It was discovered that Lua did not properly handle C stack overflows during error handling. An attacker could possibly use this issue to cause a denial of service. (CVE-2022-33099)
- Record
USN-6916-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
lua5.4Alpine:v3.14 |
before 5.4.3-r1 | 5.4.3-r1 |
lua5.4Alpine:v3.15 |
before 5.4.3-r1 | 5.4.3-r1 |
lua5.4Alpine:v3.16 |
before 5.4.4-r4 | 5.4.4-r4 |
lua5.4Alpine:v3.17 |
before 5.4.4-r4 | 5.4.4-r4 |
lua5.4Alpine:v3.18 |
before 5.4.4-r4 | 5.4.4-r4 |
lua5.4Alpine:v3.19 |
before 5.4.4-r4 | 5.4.4-r4 |
lua5.4Alpine:v3.20 |
before 5.4.4-r4 | 5.4.4-r4 |
lua5.4Alpine:v3.21 |
before 5.4.4-r4 | 5.4.4-r4 |
lua5.4Alpine:v3.22 |
before 5.4.4-r4 | 5.4.4-r4 |
lua5.4Alpine:v3.23 |
before 5.4.4-r4 | 5.4.4-r4 |
Show 28 moreShow less
| Package | Affected | Fixed |
|---|---|---|
lua5.4Alpine:v3.24 |
before 5.4.4-r4 | 5.4.4-r4 |
luaAlmaLinux:9 |
before 5.4.4-3.el9 | 5.4.4-3.el9 |
lua-develAlmaLinux:9 |
before 5.4.4-3.el9 | 5.4.4-3.el9 |
lua-libsAlmaLinux:9 |
before 5.4.4-3.el9 | 5.4.4-3.el9 |
ntopngAzure Linux:3 |
before 5.2.1-3 | 5.2.1-3 |
luaAzure Linux:2 |
before 5.4.3-2 | 5.4.3-2 |
luaBitnami |
5.4.0 up to 5.4.5 | 5.4.5 |
lua5.4Debian:12 |
before 5.4.4-2 | 5.4.4-2 |
lua5.4Debian:13 |
before 5.4.4-2 | 5.4.4-2 |
lua5.4Debian:14 |
before 5.4.4-2 | 5.4.4-2 |
Lua_jllJulia |
5.4.3+0 up to 5.4.6+0 | 5.4.6+0 |
luaopenEuler:22.03-LTS From an advisory covering 2 CVEs |
before 5.4.3-6.oe2203 | 5.4.3-6.oe2203 |
luaRed Hat:enterprise_linux:9::appstream |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-debuginfoRed Hat:enterprise_linux:9::appstream |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-debugsourceRed Hat:enterprise_linux:9::appstream |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-libs-debuginfoRed Hat:enterprise_linux:9::appstream |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
luaRed Hat:enterprise_linux:9::baseos |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-debuginfoRed Hat:enterprise_linux:9::baseos |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-debugsourceRed Hat:enterprise_linux:9::baseos |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-libsRed Hat:enterprise_linux:9::baseos |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-libs-debuginfoRed Hat:enterprise_linux:9::baseos |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
luaRed Hat:enterprise_linux:9::crb |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-debuginfoRed Hat:enterprise_linux:9::crb |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-debugsourceRed Hat:enterprise_linux:9::crb |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-develRed Hat:enterprise_linux:9::crb |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua-libs-debuginfoRed Hat:enterprise_linux:9::crb |
before 0:5.4.4-3.el9 | 0:5.4.4-3.el9 |
lua5.4Ubuntu:Pro:22.04:LTS |
before 5.4.4-1ubuntu0.1~esm1, plus listed versions 5.4.2-25.4.3-15.4.4-1 |
5.4.4-1ubuntu0.1~esm1 |
lua5.4Ubuntu:Pro:22.04:LTS From an advisory covering 2 CVEs |
before 5.4.4-1ubuntu0.1~esm1, plus listed versions 5.4.2-25.4.3-15.4.4-1 |
5.4.4-1ubuntu0.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-28805 is a critical vulnerability (CVSS 9.1) in Lua, published April 8, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.98%, the 87th percentile. Fixed in lua5.4 5.4.3-r1.
References
lua-users.org/lists/lua-l/2022-02/msg00001.html
lua-users.org/lists/lua-l/2022-02/msg00070.html
lua-users.org/lists/lua-l/2022-04/msg00009.html
github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RJNJ66IFDUKWJJZXHGOLRGIA3HWWC36R
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UHYZOEFDVLVAD6EEP4CDW6DNONIVVHPA
Show 23 moreShow less
security.gentoo.org/glsa/202305-23
nvd.nist.gov/vuln/detail/CVE-2022-28805
lists.fedoraproject.org/archives/list/[email protected]/message/RJNJ66IFDUKWJJZXHGOLRGIA3HWWC36R
lists.fedoraproject.org/archives/list/[email protected]/message/UHYZOEFDVLVAD6EEP4CDW6DNONIVVHPA
github.com/advisories/GHSA-pxhp-rhgc-5jx8
security.alpinelinux.org/vuln/CVE-2022-28805
access.redhat.com/errata/RHSA-2023:2582
access.redhat.com/security/cve/CVE-2022-28805
bugzilla.redhat.com/2073884
errata.almalinux.org/9/ALSA-2023-2582.html
docs.bell-sw.com/security/cves/CVE-2022-28805
github.com/CVEProject/cvelistV5/tree/main/cves/2022/28xxx/CVE-2022-28805.json
security-tracker.debian.org/tracker/CVE-2022-28805
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1632
nvd.nist.gov/vuln/detail/CVE-2021-44647
access.redhat.com/security/updates/classification
access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.2_release_notes/index
bugzilla.redhat.com/show_bug.cgi?id=2073884
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_2582.json
cve.org/CVERecord?id=CVE-2022-28805
ubuntu.com/security/CVE-2022-28805
ubuntu.com/security/notices/USN-6916-1
ubuntu.com/security/CVE-2022-33099