Buffer Overflow Vulnerability in Perl Package: CVE-2020-12723

perl Updated 02 Oct 2025

Summary

05/06/2020
N/A
Yes i
High
7.5

ALPINE-CVE-2020-12723: regcomp.c in Perl before 5.30.3 allows a buffer overflow via a crafted regular expression because of recursive S_study_chunk calls. Affects perl versions < 5.28.3-r0. Fixed in 5.28.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 flexibility and power in text processing, system administration, and web development. It is widely used in various applications due to its rich set of features and extensive library support. However, certain versions of Perl are vulnerable to a buffer overflow issue that can be exploited through crafted regular expressions, potentially leading to severe consequences.

Vulnerability Detail

The vulnerability, identified as CVE-2020-12723, originates from a flaw in the regcomp.c file within Perl versions prior to 5.30.3. This flaw allows a buffer overflow via recursive S_study_chunk calls when processing specially crafted regular expressions. The ramifications of this vulnerability can be severe, including application crashes or arbitrary code execution, which can compromise the integrity and security of the system running the affected Perl version.

How To Fix

Minimum fixed version

5.28.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

As a temporary workaround, avoid using crafted regular expressions that could trigger this vulnerability until the package is updated. Additionally, consider implementing input validation to mitigate the risk of exploitation.

Conclusion

CVE-2020-12723 represents a significant security risk for applications using vulnerable versions of Perl. It is crucial for users to update their Perl installations to the latest patched versions to protect against potential exploitation. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for perl →

Share this vulnerability

FAQ

CVE-2020-12723 is a buffer overflow vulnerability in Perl that can be exploited through crafted regular expressions, leading to potential application crashes or arbitrary code execution.

Perl versions prior to 5.30.3 are affected by this vulnerability. Users should update to 5.30.3 or later to mitigate the risk.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By uploading your manifest file, you can check for vulnerabilities without needing to install any software.

The CVSS score for CVE-2020-12723 is 7.5, indicating a high severity level.

While the best solution is to update to the patched version, you can temporarily avoid using crafted regular expressions and implement input validation as a workaround.

Related vulnerabilities

Recent vulnerabilities recorded for perl.

How To Fix

Minimum fixed version

5.28.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