Stack-based buffer overflow in LuaJIT - CVE-2024-25176
Published: November 3, 2025
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
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
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