CVE-2021-3712

7.4 HIGH

📋 TL;DR

This OpenSSL vulnerability allows attackers to cause buffer overruns when applications directly construct ASN.1 strings without proper NUL termination. Exploitation can lead to denial of service or memory disclosure, potentially exposing private keys or sensitive data. Affects applications using OpenSSL 1.1.1-1.1.1k or 1.0.2-1.0.2y.

💻 Affected Systems

Products:
  • OpenSSL
  • Applications using OpenSSL libraries
Versions: OpenSSL 1.1.1-1.1.1k, OpenSSL 1.0.2-1.0.2y
Operating Systems: All operating systems using affected OpenSSL versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when applications directly construct ASN.1 strings without NUL termination using ASN1_STRING_set0() or direct field manipulation.

📦 What is this software?

Openssl by Openssl

OpenSSL is a robust, commercial-grade toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It provides cryptographic functions and is one of the most widely used libraries for implementing secure communications in applications worldwide.

Learn more about Openssl →

Openssl by Openssl

OpenSSL is a robust, commercial-grade toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It provides cryptographic functions and is one of the most widely used libraries for implementing secure communications in applications worldwide.

Learn more about Openssl →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Disclosure of private keys or sensitive memory contents, leading to complete system compromise and data exfiltration.

🟠

Likely Case

Application crashes causing denial of service, potentially disrupting critical services.

🟢

If Mitigated

Limited impact with proper input validation and using OpenSSL parsing functions instead of direct ASN.1 construction.

🌐 Internet-Facing: MEDIUM - Requires specific application behavior and ASN.1 string construction, not directly exploitable via simple network requests.
🏢 Internal Only: LOW - Requires application-level access and specific programming patterns to trigger.

🎯 Exploit Status

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

Exploitation requires application-specific conditions and attacker ability to influence ASN.1 string construction.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: OpenSSL 1.1.1l, OpenSSL 1.0.2za

Vendor Advisory: https://www.openssl.org/news/secadv/20210824.txt

Restart Required: Yes

Instructions:

1. Identify OpenSSL version with 'openssl version'. 2. Update to OpenSSL 1.1.1l or 1.0.2za. 3. Restart all services using OpenSSL. 4. Recompile applications if statically linked.

🔧 Temporary Workarounds

Avoid direct ASN.1 construction

all

Modify applications to use OpenSSL parsing functions (d2i) instead of directly constructing ASN.1 strings with ASN1_STRING_set0()

🧯 If You Can't Patch

  • Review application code for direct ASN.1 string construction and replace with OpenSSL parsing functions
  • Implement strict input validation and bounds checking for ASN.1 data processing

🔍 How to Verify

Check if Vulnerable:

Run 'openssl version' and check if output is between 1.1.1-1.1.1k or 1.0.2-1.0.2y

Check Version:

openssl version

Verify Fix Applied:

Run 'openssl version' and verify output is 1.1.1l or higher, or 1.0.2za or higher

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults in OpenSSL functions
  • Memory access violation errors in ASN.1 processing

Network Indicators:

  • Unusual certificate parsing attempts
  • Abnormal ASN.1 data in network traffic

SIEM Query:

source="*openssl*" AND ("segmentation fault" OR "buffer overrun" OR "ASN.1")

🔗 References

📤 Share & Export