CVE-2020-24370
Lua vulnerability analysis and mitigation

Overview

CVE-2020-24370 affects ldebug.c in Lua 5.4.0, where a negation overflow and segmentation fault can occur in getlocal and setlocal functions, as demonstrated by getlocal(3,2^31). The vulnerability was discovered in July 2020 and affects Lua programming language versions up to 5.4.0 (Lua Users).

Technical details

The vulnerability is classified as an Integer Underflow (Wrap or Wraparound) issue with a CVSS v3.1 Base Score of 5.3 (Medium) and vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. The issue occurs specifically in the findvararg function within ldebug.c, where negative values for parameter 'n' can cause unexpected behavior (NVD).

Impact

When exploited, this vulnerability can lead to a denial of service condition through segmentation faults in the affected Lua implementation. The impact is primarily limited to availability, with no direct effects on confidentiality or integrity of the system (Debian LTS).

Exploitability

The vulnerability can be triggered by calling the getlocal function with specific parameters, particularly getlocal(3,2^31). A proof of concept was publicly disclosed demonstrating the exploitation method (Lua Users).

Mitigation and workarounds

A fix was released through a patch that corrects the integer overflow issue in the findvararg function. The fix has been incorporated into various distribution packages including Debian and Fedora. Users are advised to upgrade to the patched versions: Debian 9 users should upgrade to version 5.3.3-1+deb9u1, and Fedora users to version 5.3.5-8 (Debian LTS, Fedora Update).

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
  • redis-debugsource
NoYesOct 03, 2025
CVE-2022-28805CRITICAL9.1
  • Lua logoLua
  • ntopng
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