CVE-2013-1437

9.8 CRITICAL

📋 TL;DR

This CVE describes an eval injection vulnerability in Perl's Module-Metadata module that allows remote attackers to execute arbitrary Perl code by manipulating the $Version value. This affects systems using vulnerable versions of the Module-Metadata module before 1.000015. The vulnerability enables remote code execution with potentially severe consequences.

💻 Affected Systems

Products:
  • Perl Module-Metadata
Versions: All versions before 1.000015
Operating Systems: All operating systems running Perl
Default Config Vulnerable: ⚠️ Yes
Notes: Any Perl application using Module-Metadata to parse module metadata is vulnerable if it processes untrusted input.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining full control over the affected system, allowing data theft, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Remote code execution leading to application compromise, data exfiltration, and potential privilege escalation on the affected host.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing, potentially reduced to denial of service or information disclosure.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability is straightforward to exploit as it involves direct eval injection with user-controlled input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.000015 and later

Vendor Advisory: https://metacpan.org/changes/distribution/Module-Metadata

Restart Required: No

Instructions:

1. Update Perl Module-Metadata to version 1.000015 or later using CPAN: 'cpan Module-Metadata'
2. Verify the update with: 'perl -MModule::Metadata -e "print $Module::Metadata::VERSION"'
3. Restart any Perl applications or services using the module.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation to reject or sanitize any untrusted input passed to Module-Metadata parsing functions.

# Implement input validation in Perl code before calling Module::Metadata functions
# Example: validate $version input before processing
if ($version !~ /^[\d\.]+$/) { die "Invalid version format"; }

🧯 If You Can't Patch

  • Implement network segmentation to isolate systems using vulnerable Module-Metadata versions from untrusted networks.
  • Deploy application-level firewalls or WAF rules to block suspicious patterns in input to Perl applications.

🔍 How to Verify

Check if Vulnerable:

Check the installed Module-Metadata version with: perl -MModule::Metadata -e "print $Module::Metadata::VERSION"

Check Version:

perl -MModule::Metadata -e "print $Module::Metadata::VERSION"

Verify Fix Applied:

Verify version is 1.000015 or higher with: perl -MModule::Metadata -e "print $Module::Metadata::VERSION >= 1.000015 ? 'PATCHED' : 'VULNERABLE'"

📡 Detection & Monitoring

Log Indicators:

  • Unusual Perl eval errors in application logs
  • Suspicious process execution from Perl applications
  • Unexpected network connections from Perl processes

Network Indicators:

  • Outbound connections from Perl applications to unexpected destinations
  • Unusual HTTP/HTTPS traffic patterns from Perl services

SIEM Query:

source="*perl*" AND (eval OR "Module::Metadata" OR "arbitrary code")

🔗 References

📤 Share & Export