CVE-2021-43572

9.8 CRITICAL

📋 TL;DR

This vulnerability in the Stark Bank Python ECDSA library allows attackers to forge digital signatures on arbitrary messages due to missing validation of non-zero signatures. Any application using this library for cryptographic signature verification is affected, potentially compromising authentication, authorization, and data integrity mechanisms.

💻 Affected Systems

Products:
  • starkbank-ecdsa-python
  • ecdsa-python
Versions: All versions before 2.0.1
Operating Systems: All operating systems running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Any Python application importing and using the verify function from this library is vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of systems relying on ECDSA signatures for authentication, allowing attackers to impersonate legitimate users, authorize fraudulent transactions, or tamper with signed data without detection.

🟠

Likely Case

Authentication bypass in applications using this library for signature verification, potentially leading to unauthorized access to sensitive systems or data manipulation.

🟢

If Mitigated

Limited impact if additional security controls like multi-factor authentication, rate limiting, or transaction monitoring are in place to detect anomalous signature patterns.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Technical advisory includes proof-of-concept demonstrating signature forgery. The simplicity of the vulnerability makes weaponization straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.1

Vendor Advisory: https://github.com/starkbank/ecdsa-python/releases/tag/v2.0.1

Restart Required: No

Instructions:

1. Update the starkbank-ecdsa package using pip: pip install starkbank-ecdsa>=2.0.1
2. Verify the update with: pip show starkbank-ecdsa
3. Test signature verification functionality in your application
4. No service restart required for Python applications, but ensure all processes use the updated library

🔧 Temporary Workarounds

Manual signature validation

all

Add custom validation to check that signatures are non-zero before calling the verify function

# Python code snippet to add before verify calls
if signature == 0 or signature is None:
    raise ValueError('Invalid signature: zero or None')

🧯 If You Can't Patch

  • Implement additional authentication layers (MFA, IP whitelisting) for operations requiring signature verification
  • Monitor for anomalous signature patterns and implement transaction validation checks outside the vulnerable library

🔍 How to Verify

Check if Vulnerable:

Check if your Python environment has starkbank-ecdsa version <2.0.1 installed

Check Version:

pip show starkbank-ecdsa | grep Version

Verify Fix Applied:

Verify starkbank-ecdsa version is 2.0.1 or higher and test signature verification with known valid and invalid signatures

📡 Detection & Monitoring

Log Indicators:

  • Failed signature verification attempts with zero-value signatures
  • Successful authentications with suspicious signature patterns
  • Unusual transaction volumes from single signatures

Network Indicators:

  • Increased authentication requests with similar signature patterns
  • Traffic spikes to signature verification endpoints

SIEM Query:

source="application_logs" AND (signature="0" OR signature="null") AND action="verify"

🔗 References

📤 Share & Export