Buffer Overflow Vulnerability in Lua 5.1 and 5.2 Packages

lua5.1 Updated 02 Oct 2025

Summary

04/09/2014
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2014-5461: Buffer overflow in the vararg functions in ldo.c in Lua 5.1 through 5.2.x before 5.2.3 allows context-dependent attackers to cause a denial of service (crash) via a small number of arguments to a function with a large nu... Affects lua5.1 versions < 5.1.5-7. Fixed in 5.1.5-7. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Lua is a powerful, efficient, lightweight scripting language commonly used for embedded systems and game development. The versions 5.1 and 5.2 of Lua are widely utilized in various applications. However, these versions are susceptible to a buffer overflow vulnerability that can lead to denial of service attacks, affecting the stability and security of applications relying on them.

Vulnerability Detail

The vulnerability arises from a buffer overflow in the vararg functions within ldo.c of Lua versions 5.1 through 5.2.x prior to 5.2.3. This flaw allows context-dependent attackers to exploit the system by passing a small number of arguments to a function that expects a larger number of fixed arguments. The result can lead to application crashes, compromising the availability of services that depend on Lua.

How To Fix

Minimum fixed version

5.1.5-7

This is the first release that contains the fix.

sudo apt-get install --only-upgrade lua5.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using functions that rely on vararg parameters until the package is updated. Additionally, validate the number of arguments passed to functions to prevent potential exploitation.

Conclusion

The buffer overflow vulnerability in Lua 5.1 and 5.2 poses significant risks to applications using these versions. It is crucial to update to the patched versions to ensure the security and stability of your systems. Utilizing tools like Vulert can help monitor for such vulnerabilities effectively.

See every vulnerability recorded for lua5.1 →

Share this vulnerability

FAQ

A buffer overflow vulnerability occurs when a program writes more data to a buffer than it can hold, potentially overwriting adjacent memory and leading to unpredictable behavior or crashes.

Exploiting this vulnerability can lead to denial of service attacks, causing your application to crash and become unavailable to users.

The vulnerability affects Lua versions 5.1 through 5.2.x before version 5.2.3.

Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground at Vulert Scanner without any signup.

If immediate updates are not possible, consider implementing input validation and avoiding the use of vulnerable functions as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for lua5.1.

How To Fix

Minimum fixed version

5.1.5-7

This is the first release that contains the fix.

sudo apt-get install --only-upgrade lua5.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback