Critical Buffer Overflow Vulnerability in Perl Package

perl Updated 02 Oct 2025

Summary

07/12/2018
N/A
Yes i
Critical
9.8

ALPINE-CVE-2018-18314: Perl before 5.26.3 has a buffer overflow via a crafted regular expression that triggers invalid write operations. Affects perl versions < 5.26.3-r0. Fixed in 5.26.3-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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Perl is a high-level, general-purpose programming language known for its text processing capabilities and flexibility. It is widely used for web development, system administration, and network programming. The Perl package in Alpine Linux distributions is essential for running Perl scripts and applications. However, a critical vulnerability has been identified that affects multiple versions of this package, making it susceptible to buffer overflow attacks.

Vulnerability Detail

The vulnerability, identified as CVE-2018-18314, exists in Perl versions prior to 5.26.3. It is caused by a buffer overflow that can occur when processing crafted regular expressions, leading to invalid write operations. This flaw can potentially allow an attacker to execute arbitrary code, resulting in severe consequences such as data corruption, unauthorized access, or system crashes. The CVSS score for this vulnerability is 9.8, indicating a critical level of risk.

How To Fix

Minimum fixed version

5.26.3-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

If immediate updating is not feasible, consider restricting the use of Perl scripts that may process untrusted input until the package can be updated. Additionally, implementing input validation can help mitigate the risk of exploitation.

Conclusion

The buffer overflow vulnerability in the Perl package poses a critical risk to applications using affected versions. It is crucial to update to the patched version 5.26.3-r0 to mitigate this risk. Users should also consider using Vulert to monitor for vulnerabilities in their applications.

See every vulnerability recorded for perl →

Share this vulnerability

FAQ

CVE-2018-18314 is a critical buffer overflow vulnerability found in Perl versions prior to 5.26.3, which can lead to arbitrary code execution.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The vulnerability can lead to data corruption, unauthorized access, and system crashes, posing significant risks to applications using affected Perl versions.

Yes, the patched version of Perl is 5.26.3-r0, which addresses the buffer overflow issue.

If you cannot update Perl right away, consider restricting the use of vulnerable scripts and implementing input validation to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for perl.

How To Fix

Minimum fixed version

5.26.3-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