Cloudanix VulnDB

CVE-2013-7422

None

CVSS

—

EPSS

3.0%

Published

Aug 16, 2015

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

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

  1. Identify an application that accepts and compiles user-controlled regular expressions using vulnerable Perl
  2. Craft a regex payload with an invalid backreference and oversized digit string
  3. Deliver the payload via network input or local file
  4. Trigger regex compilation to induce the integer underflow
  5. 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