Stack-based buffer overflow in LuaJIT - CVE-2024-25176

 

Stack-based buffer overflow in LuaJIT - CVE-2024-25176

Published: November 3, 2025


Vulnerability identifier: #VU117942
CSH Severity: High
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2024-25176
CWE-ID: CWE-121
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error within the lj_strfmt_wfnum() function in lj_strfmt_num.c. A remote attacker can trick the victim into opening a specially crated file, trigger a stack-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

LuaJIT
SUSE Linux Enterprise Desktop 15
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server for SAP Applications 15
Ubuntu
Basesystem Module
SUSE Package Hub 15
openSUSE Leap
Fedora
envoy
luajit (Ubuntu package)
lua51-luajit-devel
lua51-luajit
lua51-luajit-debuginfo
lua51-luajit-debugsource
luajit-debugsource
libluajit-5_1-2-64bit-debuginfo
libluajit-5_1-2-64bit
libluajit-5_1-2-32bit
libluajit-5_1-2-32bit-debuginfo
luajit
luajit-devel
libluajit-5_1-2
libluajit-5_1-2-debuginfo
luajit-debuginfo

How to mitigate CVE-2024-25176

Install updates from vendor's website.

envoy - addressed in versions 1.33.10, 1.34.8, 1.35.4
luajit (Ubuntu package) - addressed in versions 2.0.2+dfsg-1ubuntu0.1~esm1, 2.0.4+dfsg-1+deb9u1ubuntu0.1~esm1, 2.1.0~beta3+dfsg-5.1ubuntu0.18.04.1~esm1, 2.1.0~beta3+dfsg-5.1ubuntu0.20.04.1~esm1, 2.1.0~beta3+dfsg-6ubuntu0.1, 2.1.0+git20231223.c525bcb+dfsg-1ubuntu0.1
lua51-luajit-devel - update to 2.1.0~beta2-150000.3.3.1
lua51-luajit - update to 2.1.0~beta2-150000.3.3.1
lua51-luajit-debuginfo - update to 2.1.0~beta2-150000.3.3.1
lua51-luajit-debugsource - update to 2.1.0~beta2-150000.3.3.1
luajit-debugsource - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
libluajit-5_1-2-64bit-debuginfo - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
libluajit-5_1-2-64bit - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
libluajit-5_1-2-32bit - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
libluajit-5_1-2-32bit-debuginfo - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
luajit - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
luajit-devel - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
libluajit-5_1-2 - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
libluajit-5_1-2-debuginfo - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
luajit-debuginfo - update to 2.1.0~beta3+git.1624618403.e9577376-150400.4.5.1
luajit - addressed in versions 2.1.1748459687-2.fc41, 2.1.1748459687-2.fc42

External References

Related Security Bulletins