Critical Heap-Based Buffer Overflow in Perl Package

perl Updated 02 Oct 2025

Summary

17/04/2018
N/A
Yes i
Critical
9.8

ALPINE-CVE-2018-6797: An issue was discovered in Perl 5.18 through 5.26. A crafted regular expression can cause a heap-based buffer overflow, with control over the bytes written. Affects perl versions < 5.26.2-r0. Fixed in 5.26.2-r0. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Perl is a high-level, general-purpose programming language known for its text processing capabilities and flexibility. It is widely used in web development, system administration, and network programming. However, versions of Perl from 5.18 to 5.26 are vulnerable to a severe security issue that can lead to a heap-based buffer overflow, potentially allowing attackers to execute arbitrary code.

Vulnerability Detail

An issue was discovered in Perl versions 5.18 through 5.26, where a crafted regular expression can cause a heap-based buffer overflow. This vulnerability allows attackers to control the bytes written, leading to potential arbitrary code execution, data corruption, or system crashes. The vulnerability is classified with a CVSS score of 9.8, indicating its critical nature and the high risk it poses to affected systems.

How To Fix

Minimum fixed version

5.26.2-r0

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 crafted regular expressions that may trigger this vulnerability until the package is updated. Regular expressions should be validated and sanitized to prevent exploitation.

Conclusion

The vulnerability in the Perl package poses a significant risk due to its potential for arbitrary code execution. Users are strongly advised to update to the patched version to mitigate this risk. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for perl →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 9.8, indicating a critical severity level.

Perl versions 5.18 through 5.26 are affected by this vulnerability.

Exploitation of this vulnerability can lead to arbitrary code execution, data corruption, or system crashes.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring signup.

The recommended action is to update the Perl package to the fixed version 5.26.2-r0 as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for perl.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

5.26.2-r0

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