CVE-2013-7422
NoneCVSS
—
EPSS
3.0%
Published
Aug 16, 2015
CISA due date
—
Cloudanix analysis
An old flaw in Perl could let attackers run their own code or crash programs by feeding specially crafted text patterns into applications that use regular expressions.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer underflow during regex compilation in regcomp.c allows memory corruption when processing a crafted backreference with an excessively long digit string, enabling arbitrary code execution or application crash.
Why it matters to the business
Unpatched systems remain exposed to remote code execution or denial of service in any application that compiles untrusted regular expressions, potentially leading to data compromise or service outages on legacy deployments.
How an attack unfolds
An attacker supplies a malicious regular expression containing an invalid backreference paired with a long digit string to a vulnerable Perl process; the underflow occurs during compilation in regcomp.c, corrupting memory and allowing code execution or crash.
How to fix it
Upgrade Perl to version 5.20 or later on all affected systems; for Apple OS X environments, apply updates to version 10.10.5 or newer. Where upgrades are impossible, restrict untrusted regex input or employ application-level sandboxing.
How to confirm the fix worked
Execute 'perl -v' and confirm the version string reports 5.20.0 or higher; review application source and dependencies to ensure no vulnerable Perl runtime remains in use.
Typical attack path
- Identify an application that accepts and compiles user-controlled regular expressions using vulnerable Perl
- Craft a regex payload with an invalid backreference and oversized digit string
- Deliver the payload via network input or local file
- Trigger regex compilation to induce the integer underflow
- Leverage resulting memory corruption for code execution or denial of service
How to detect it
Review application logs and process crash dumps for signs of regex compilation failures or memory corruption originating from regcomp.c; correlate with inbound network traffic or file inputs containing unusually long numeric sequences inside regex constructs.
What your security team should do
- Prioritize patching Perl to 5.20+ across all environments given the remote code execution potential
- Inventory applications and scripts that process external regular expressions
- Implement input validation or sandboxing for regex handling until patches are applied
- Monitor for new exploit maturity indicators despite the long public disclosure window
The record
Integer underflow in regcomp.c in Perl before 5.20, as used in Apple OS X before 10.10.5 and other products, allows context-dependent attackers to execute arbitrary code or cause a denial of service (application crash) via a long digit string associated with an invalid backreference within a regular expression.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | perl | 0 | 5.20.0-1 |
| Debian:12 | perl | 0 | 5.20.0-1 |
| Debian:13 | perl | 0 | 5.20.0-1 |
| Ubuntu:14.04:LTS | perl | 0 | 5.18.2-2ubuntu1.1 |
Related vulnerabilities
- CVE-2020-16156 CPAN 2.28 allows Signature Verification Bypass. Also affects perl
- CVE-2017-12837 Heap-based buffer overflow in the S_regatom function in regcomp.c in Perl 5 before… Also affects perl
- CVE-2015-8853 The (1) S_reghop3, (2) S_reghop4, and (3) S_reghopmaybe3 functions in regexec.c in Perl… Also affects perl
- CVE-2012-6329 The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl… Also affects perl
- CVE-2011-3597 Eval injection vulnerability in the Digest module before 1.17 for Perl allows… Also affects perl
- CVE-2011-1487 The (1) lc, (2) lcfirst, (3) uc, and (4) ucfirst functions in Perl 5.10.x, 5.11.x, and… Also affects perl
- CVE-2026-102621 A vulnerability was identified in Freedesktop Poppler up to 26.08.0. CWE-189
- CVE-2026-102620 A vulnerability was determined in Freedesktop Poppler 26.06.0/26.07.0/26.08.0. CWE-189