Heap Buffer Overflow Vulnerability in Perl Package

perl Updated 02 Oct 2025

Summary

13/04/2025
N/A
Yes i
Unrated
Not published

ALPINE-CVE-2024-56406: A heap buffer overflow vulnerability was discovered in Perl. Affects perl versions < 5.36.2-r1. Fixed in 5.36.2-r1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Perl is a high-level, general-purpose programming language known for its flexibility and capability in text processing, system administration, web development, and network programming. It is widely used due to its rich ecosystem of modules and libraries. However, certain versions of Perl have been found to be vulnerable to a heap buffer overflow, which can lead to severe security issues.

Vulnerability Detail

A heap buffer overflow vulnerability was discovered in Perl, affecting release branches 5.34, 5.36, 5.38, and 5.40, including development versions from 5.33.1 through 5.41.10. The vulnerability arises when non-ASCII bytes are present in the left-hand side of the 'tr' operator, causing the function S_do_trans_invmap to overflow the destination pointer 'd'. This can lead to a segmentation fault and potentially allow for Denial of Service (DoS) attacks or even code execution on systems lacking adequate defenses.

How To Fix

Minimum fixed version

5.36.2-r1

This is the first release that contains the fix.

sudo apk add --upgrade perl

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

Workaround

As a temporary workaround, avoid using the 'tr' operator with non-ASCII bytes on the left-hand side until the package can be updated.

Conclusion

The heap buffer overflow vulnerability in Perl poses significant risks, including potential Denial of Service and code execution attacks. It is crucial for users of affected versions to update their packages promptly to mitigate these risks. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for perl →

Share this vulnerability

FAQ

A heap buffer overflow occurs when a program writes more data to a buffer located on the heap than it can hold, potentially corrupting adjacent memory and leading to unpredictable behavior.

Exploiting this vulnerability could lead to Denial of Service attacks or allow an attacker to execute arbitrary code, compromising the security of your application.

The affected versions include Perl release branches 5.34, 5.36, 5.38, and 5.40, as well as development versions from 5.33.1 through 5.41.10.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By simply uploading your manifest file like package-lock.json, you can check for vulnerabilities in real-time.

If immediate updates are not possible, avoid using the vulnerable features of Perl, such as the 'tr' operator with non-ASCII bytes, until you can apply the necessary updates.

Related vulnerabilities

Recent vulnerabilities recorded for perl.

How To Fix

Minimum fixed version

5.36.2-r1

This is the first release that contains the fix.

sudo apk add --upgrade perl

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