Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2020-24369
Lua vulnerability analysis and mitigation

Overview

ldebug.c in Lua 5.4.0 attempts to access debug information via the line hook of a stripped function, leading to a NULL pointer dereference. The vulnerability was discovered and disclosed in August 2020, affecting Lua version 5.4.0. This security issue is tracked as CVE-2020-24369 and has been assigned a CVSS v3.1 base score of 7.5 HIGH (NVD).

Technical details

The vulnerability occurs in the ldebug.c file of Lua 5.4.0 when attempting to access debug information through the line hook functionality of a stripped function. The issue specifically manifests when the code tries to access debug information without properly checking whether it is present, resulting in a NULL pointer dereference. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 HIGH, with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD).

Impact

When exploited, this vulnerability can lead to a NULL pointer dereference, which typically results in program termination. This can cause a denial of service condition in applications running the affected Lua version. The impact is particularly significant for network-accessible applications that use Lua's debugging features (Oracle Bulletin).

Exploitability

The vulnerability can be triggered when debug hooks are used with stripped functions (functions without debug information). A proof-of-concept exploit demonstrates that the issue can be reproduced by setting a line hook on a stripped function (Lua Bugs).

Mitigation and workarounds

The vulnerability was fixed in subsequent versions of Lua. The fix involves adding proper checks for the presence of debug information before attempting to access it. A patch was committed that modifies the changedline function in ldebug.c to check if p->lineinfo is NULL before accessing debug information (Lua Patch).

Additional resources


SourceThis report was generated using AI

Related Lua vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-49844CRITICAL9.9
  • Lua logoLua
  • valkey
NoYesOct 03, 2025
CVE-2022-28805CRITICAL9.1
  • Lua logoLua
  • nmap
NoYesApr 08, 2022
CVE-2026-24827HIGH7.5
  • Lua logoLua
  • lua
NoYesJan 27, 2026
CVE-2023-4540HIGH7.5
  • Lua logoLua
  • lua-http
NoYesSep 05, 2023
CVE-2022-33099HIGH7.5
  • Lua logoLua
  • ntopng
NoYesJul 01, 2022

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management