CVE-2020-29128

9.8 CRITICAL

📋 TL;DR

CVE-2020-29128 is an XML External Entity (XXE) vulnerability in petl versions before 1.68 that allows attackers to read arbitrary files, conduct server-side request forgery (SSRF), or cause denial of service by exploiting XML entity resolution. This affects applications using petl's XML processing functionality with vulnerable configurations.

💻 Affected Systems

Products:
  • petl
Versions: All versions before 1.68
Operating Systems: All operating systems where petl is installed
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists when petl is used to process XML documents with external entity resolution enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution, complete system compromise, or sensitive data exfiltration through XXE attacks.

🟠

Likely Case

Arbitrary file read, SSRF attacks to internal systems, or denial of service.

🟢

If Mitigated

Limited impact if XML parsing is disabled or external entity resolution is blocked.

🌐 Internet-Facing: HIGH - Applications processing untrusted XML input from external sources are vulnerable.
🏢 Internal Only: MEDIUM - Internal applications processing XML from untrusted sources remain vulnerable.

🎯 Exploit Status

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

XXE vulnerabilities are well-understood with readily available exploit techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.68 and later

Vendor Advisory: https://github.com/petl-developers/petl/compare/v1.6.7...v1.6.8

Restart Required: No

Instructions:

1. Update petl to version 1.68 or later using pip: pip install --upgrade petl>=1.68
2. Verify the update with: pip show petl
3. Test XML processing functionality after update.

🔧 Temporary Workarounds

Disable external entity resolution

all

Configure XML parser to disable external entity resolution and DTD processing

Configure XML parser with: parser.setFeature('http://xml.org/sax/features/external-general-entities', False)
parser.setFeature('http://xml.org/sax/features/external-parameter-entities', False)
parser.setFeature('http://apache.org/xml/features/disallow-doctype-decl', True)

🧯 If You Can't Patch

  • Implement input validation to reject XML documents with DOCTYPE declarations
  • Use network segmentation to isolate systems processing XML from untrusted sources

🔍 How to Verify

Check if Vulnerable:

Check petl version with: python -c "import petl; print(petl.__version__)" and verify if below 1.68

Check Version:

python -c "import petl; print(petl.__version__)"

Verify Fix Applied:

After updating, verify version is 1.68 or higher and test XML processing with known XXE payloads

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns from XML processing components
  • XML parsing errors with external entity references
  • Unexpected outbound network connections from XML processors

Network Indicators:

  • HTTP requests to internal systems from XML processing servers
  • Large XML payloads with DOCTYPE declarations

SIEM Query:

source="application_logs" AND ("DOCTYPE" OR "ENTITY" OR "SYSTEM") AND process="petl"

🔗 References

📤 Share & Export