CVE-2019-5010

7.5 HIGH

📋 TL;DR

This vulnerability allows attackers to cause denial-of-service by exploiting a NULL pointer dereference in Python's X509 certificate parser. When Python processes specially crafted TLS certificates during connection establishment, it crashes, disrupting services. This affects Python applications that handle TLS connections with the vulnerable versions.

💻 Affected Systems

Products:
  • Python
  • Applications using Python's TLS/SSL libraries
Versions: Python 2.7.11 and 3.6.6 (and potentially other versions with same vulnerable code)
Operating Systems: All operating systems running vulnerable Python versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Python applications that process X509 certificates via TLS/SSL connections. Applications not using TLS or not accepting external connections are not vulnerable.

📦 What is this software?

Python by Python

Python is a high-level, interpreted programming language known for its readability and versatility. It is widely used in web development, data science, automation, and scientific computing.

Learn more about Python →

Python by Python

Python is a high-level, interpreted programming language known for its readability and versatility. It is widely used in web development, data science, automation, and scientific computing.

Learn more about Python →

Python by Python

Python is a high-level, interpreted programming language known for its readability and versatility. It is widely used in web development, data science, automation, and scientific computing.

Learn more about Python →

Python by Python

Python is a high-level, interpreted programming language known for its readability and versatility. It is widely used in web development, data science, automation, and scientific computing.

Learn more about Python →

Python by Python

Python is a high-level, interpreted programming language known for its readability and versatility. It is widely used in web development, data science, automation, and scientific computing.

Learn more about Python →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption for Python applications handling TLS connections, potentially affecting availability of web servers, APIs, or other network services.

🟠

Likely Case

Service crashes when processing malicious TLS certificates, requiring restart of affected Python processes.

🟢

If Mitigated

Minimal impact if systems are patched or don't process untrusted TLS certificates.

🌐 Internet-Facing: HIGH - Internet-facing Python services accepting TLS connections are directly exposed to crafted certificates from attackers.
🏢 Internal Only: MEDIUM - Internal services could be affected by internal attackers or compromised systems, but exposure is more limited.

🎯 Exploit Status

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

Attack requires ability to present crafted certificate during TLS handshake, which can be done by initiating or accepting connections. No authentication needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Python 2.7.17, 3.6.10, and later versions

Vendor Advisory: https://access.redhat.com/errata/RHSA-2019:3520

Restart Required: Yes

Instructions:

1. Update Python to patched version (2.7.17+ or 3.6.10+). 2. Restart all Python applications and services. 3. For Linux distributions, use package manager: 'sudo apt-get update && sudo apt-get upgrade python' (Debian/Ubuntu) or 'sudo yum update python' (RHEL/CentOS).

🔧 Temporary Workarounds

Disable TLS certificate validation

all

Configure Python applications to not validate TLS certificates (not recommended for production)

context.verify_mode = ssl.CERT_NONE

Network filtering

all

Use firewalls to restrict TLS connections to trusted sources only

🧯 If You Can't Patch

  • Implement network segmentation to isolate vulnerable Python services
  • Use reverse proxies or load balancers to filter and inspect TLS connections before they reach vulnerable applications

🔍 How to Verify

Check if Vulnerable:

Check Python version: 'python --version' or 'python3 --version'. If version is 2.7.11 or 3.6.6 (or earlier minor versions), likely vulnerable.

Check Version:

python --version && python -c "import sys; print('Python', sys.version)"

Verify Fix Applied:

Verify Python version is 2.7.17+ or 3.6.10+. Test TLS functionality with known good certificates.

📡 Detection & Monitoring

Log Indicators:

  • Python process crashes with segmentation faults during TLS handshakes
  • Application logs showing connection failures after certificate exchange

Network Indicators:

  • Multiple failed TLS handshakes from single sources
  • Unusual certificate patterns in TLS traffic

SIEM Query:

source="*python*" AND ("segmentation fault" OR "NULL pointer" OR "certificate parse")

🔗 References

📤 Share & Export