CVE-2012-1102

7.5 HIGH
XXE

📋 TL;DR

CVE-2012-1102 is an XML External Entity (XXE) vulnerability in XML::Atom Perl module versions before 0.39. It allows attackers to read protected files on the server when parsing untrusted XML. Affected systems include any Perl applications using vulnerable XML::Atom versions to process XML from untrusted sources.

💻 Affected Systems

Products:
  • XML::Atom Perl module
Versions: All versions before 0.39
Operating Systems: All operating systems running Perl
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when parsing XML from untrusted sources. Applications must use XML::Atom for XML processing to be affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server file system disclosure including sensitive configuration files, credentials, and system files leading to full compromise.

🟠

Likely Case

Limited file read access depending on application context and server permissions, potentially exposing application configuration or user data.

🟢

If Mitigated

No impact if XML parsing is restricted to trusted sources or external entities are disabled via other means.

🌐 Internet-Facing: HIGH if processing user-supplied XML, MEDIUM if XML sources are partially controlled, LOW if no XML parsing from external sources.
🏢 Internal Only: MEDIUM if processing XML from internal untrusted sources, LOW if XML sources are fully trusted.

🎯 Exploit Status

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

XXE exploitation is well-documented and requires minimal attacker skill when application processes attacker-controlled XML.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.39 and later

Vendor Advisory: https://metacpan.org/release/MIYAGAWA/XML-Atom-0.39/source/Changes

Restart Required: No

Instructions:

1. Update XML::Atom using CPAN: 'cpan XML::Atom'
2. Or install specific version: 'cpan MIYAGAWA/XML-Atom-0.39.tar.gz'
3. Verify installation with 'perl -MXML::Atom -e 'print $XML::Atom::VERSION'

🔧 Temporary Workarounds

Disable external entities in XML parsing

all

Configure XML parser to disable external entity expansion before parsing untrusted XML

$parser->no_xxe(1); # Set before parsing

Input validation and sanitization

all

Validate and sanitize XML input before processing, reject XML containing external entity declarations

🧯 If You Can't Patch

  • Implement strict input validation to reject XML containing DOCTYPE or external entity declarations
  • Use network segmentation to restrict XML processing services from accessing sensitive internal resources

🔍 How to Verify

Check if Vulnerable:

Check XML::Atom version with: perl -MXML::Atom -e 'print "Vulnerable" if $XML::Atom::VERSION < 0.39'

Check Version:

perl -MXML::Atom -e 'print $XML::Atom::VERSION'

Verify Fix Applied:

Verify version is 0.39 or higher: perl -MXML::Atom -e 'print $XML::Atom::VERSION'

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns from XML parsing processes
  • XML parsing errors containing file paths

Network Indicators:

  • XML payloads containing external entity declarations in HTTP requests

SIEM Query:

source="web_logs" AND (http_request CONTAINS "<!ENTITY" OR http_request CONTAINS "SYSTEM")

🔗 References

📤 Share & Export