CVE-2020-29651

7.5 HIGH

📋 TL;DR

CVE-2020-29651 is a denial-of-service vulnerability in the py library's py.path.svnwc component. Attackers can cause excessive CPU consumption by supplying malicious input to the blame functionality, leading to service disruption. Users of applications that utilize the py library's Subversion working copy functionality are affected.

💻 Affected Systems

Products:
  • py (python-py)
Versions: All versions through 1.9.0
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using py.path.svnwc component with Subversion working copy functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service unavailability due to CPU exhaustion, potentially affecting multiple services if the vulnerable component is shared.

🟠

Likely Case

Temporary service degradation or crashes of applications using the vulnerable py library functionality.

🟢

If Mitigated

Minimal impact with proper input validation and resource limits in place.

🌐 Internet-Facing: MEDIUM - Requires specific functionality (blame) to be exposed and accessible.
🏢 Internal Only: LOW - Typically requires authenticated access to Subversion repositories.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to supply input to the blame functionality, typically requiring some level of repository access.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.10.0 and later

Vendor Advisory: https://github.com/pytest-dev/py/security/advisories/GHSA-5h46-5f2v-7q8q

Restart Required: Yes

Instructions:

1. Update py package: pip install --upgrade py>=1.10.0
2. Restart any services using the py library
3. Verify the update with: pip show py

🔧 Temporary Workarounds

Disable vulnerable functionality

all

Disable or restrict access to the blame functionality in applications using py.path.svnwc

Implement input validation

all

Add input validation and sanitization for inputs to the blame functionality

🧯 If You Can't Patch

  • Implement rate limiting on blame functionality to prevent repeated exploitation
  • Monitor CPU usage and implement automatic restart thresholds for affected services

🔍 How to Verify

Check if Vulnerable:

Check py version: pip show py | grep Version
If version is 1.9.0 or earlier, system is vulnerable.

Check Version:

pip show py | grep Version

Verify Fix Applied:

Verify py version is 1.10.0 or later: pip show py | grep Version
Test blame functionality with various inputs to ensure no excessive CPU usage.

📡 Detection & Monitoring

Log Indicators:

  • Unusually high CPU usage patterns
  • Application crashes related to py library
  • Repeated blame operation failures

Network Indicators:

  • Unusual patterns of Subversion repository access

SIEM Query:

source="application_logs" AND ("py.path.svnwc" OR "blame") AND (cpu_usage>90 OR "crash")

🔗 References

📤 Share & Export