CVE-2022-28805

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…

published April 8, 2022

CVSS
—
EPSS
3%
Percentile
87.2
In the wild
Unconfirmed
What it is

⚠️ A missing call in Lua's lparser.c could lead to heap-based buffer over-reads! It's like leaving a recipe incomplete and wondering why the cake collapses. 🎂 Think of it as a chef trying to bake a cake without a crucial step — skipping that vital process can lead to a wildly inconsistent result. In this case, Lua is the chef, and missing that call can cause code to behave unexpectedly when compiling untrusted scripts. While the severity is tagged as unknown, the potential for heap-based buffer over-reads could allow attackers to extract sensitive data or cause unpredictable behavior. This could be particularly concerning when untrusted Lua code is involved, putting systems at risk.

Put simply

Think of it as a chef trying to bake a cake without a crucial step — skipping that vital process can lead to a wildly inconsistent result. In this case, Lua is the chef, and missing that call can cause code to behave unexpectedly when compiling untrusted scripts. This vulnerability in Lua versions 5.4.0 to 5.4.4 happens due to the absence of the luaK_exp2anyregup call in the lparser.c file, which might allow for heap-based buffer over-reads when untrusted code is executed.

What to do

While the severity is tagged as unknown, the potential for heap-based buffer over-reads could allow attackers to extract sensitive data or cause unpredictable behavior. This could be particularly concerning when untrusted Lua code is involved, putting systems at risk. Upgrade Lua to version 5.4.4 or later to resolve this vulnerability. It’s vital to review any applications using these vulnerable versions, especially if they process untrusted Lua code. Implement strict input validation for any external scripts you run. You’ve got this! Just follow these steps, and you'll keep your system safe and sound! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.02976 · 87.2th percentile
Published
2022-04-08T00:00Z
EPSS history
Timeline
  • 08 APR 00:00Z
    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…
    cvelistv5