CVE-2021-3450

7.4 HIGH

📋 TL;DR

This OpenSSL vulnerability allows certificate chain validation to be bypassed when the X509_V_FLAG_X509_STRICT flag is explicitly set. It affects applications using OpenSSL 1.1.1h-1.1.1j that enable strict certificate checking without setting a verification purpose. The flaw could allow non-CA certificates to issue other certificates, potentially enabling man-in-the-middle attacks.

💻 Affected Systems

Products:
  • OpenSSL
Versions: 1.1.1h through 1.1.1j
Operating Systems: All operating systems using affected OpenSSL versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when X509_V_FLAG_X509_STRICT is explicitly set AND no verification purpose is configured (or default purpose is overridden). Default libssl configurations are NOT vulnerable.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could issue fraudulent certificates to impersonate legitimate services, enabling man-in-the-middle attacks against TLS connections and potentially intercepting sensitive data.

🟠

Likely Case

Limited impact since most applications use default verification purposes that still catch the issue. Only custom applications with specific configurations are vulnerable.

🟢

If Mitigated

No impact if applications use default verification purposes or have upgraded to patched versions.

🌐 Internet-Facing: MEDIUM - Only affects specific configurations, but internet-facing services with custom certificate validation could be vulnerable to MITM attacks.
🏢 Internal Only: LOW - Internal services typically use standard configurations and are less likely to have the specific vulnerable configuration.

🎯 Exploit Status

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

Exploitation requires ability to present a malicious certificate chain to a vulnerable application. Requires specific application configuration to be vulnerable.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: OpenSSL 1.1.1k

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

Restart Required: Yes

Instructions:

1. Download OpenSSL 1.1.1k from openssl.org. 2. Compile and install following standard build procedures. 3. Restart all services using OpenSSL. 4. Recompile any statically linked applications.

🔧 Temporary Workarounds

Ensure verification purpose is set

all

Configure certificate verification with a purpose (like X509_PURPOSE_SSL_CLIENT or X509_PURPOSE_SSL_SERVER) when using X509_V_FLAG_X509_STRICT

# In application code, ensure X509_VERIFY_PARAM_set_purpose() is called with appropriate purpose

Disable X509_STRICT flag

all

Remove X509_V_FLAG_X509_STRICT from verification flags if not strictly required

# In application code, clear X509_V_FLAG_X509_STRICT flag from verification parameters

🧯 If You Can't Patch

  • Ensure all applications using OpenSSL have verification purposes properly configured
  • Implement network segmentation to limit exposure of vulnerable services

🔍 How to Verify

Check if Vulnerable:

Check OpenSSL version with 'openssl version' and verify if between 1.1.1h and 1.1.1j. Review application code for X509_V_FLAG_X509_STRICT usage without purpose setting.

Check Version:

openssl version

Verify Fix Applied:

Verify OpenSSL version is 1.1.1k or newer with 'openssl version'. Test certificate validation with test cases that should fail with non-CA certificates.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected certificate validation successes
  • Certificate chain validation errors in logs

Network Indicators:

  • Unusual certificate chains presented to services
  • MITM detection alerts

SIEM Query:

source="*ssl*" OR source="*openssl*" AND (message="*certificate*" OR message="*validation*") AND (message="*error*" OR message="*bypass*")

🔗 References

📤 Share & Export