CVE-2023-0216

7.5 HIGH

📋 TL;DR

This CVE describes a NULL pointer dereference vulnerability in OpenSSL's PKCS7 parsing functions (d2i_PKCS7, d2i_PKCS7_bio, d2i_PKCS7_fp). When applications process malformed PKCS7 data using these functions, it can cause a crash leading to denial of service. Third-party applications that call these functions on untrusted data are affected, but OpenSSL's TLS implementation does not use these vulnerable functions.

💻 Affected Systems

Products:
  • OpenSSL
Versions: OpenSSL 3.0.0 to 3.0.7
Operating Systems: All operating systems running affected OpenSSL versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when applications explicitly call d2i_PKCS7(), d2i_PKCS7_bio(), or d2i_PKCS7_fp() functions on untrusted data. OpenSSL's TLS implementation does not use these functions.

📦 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

Application crash leading to denial of service, potentially disrupting critical services that process PKCS7 data from untrusted sources.

🟠

Likely Case

Application crashes when processing specially crafted PKCS7 data, causing service disruption until restart.

🟢

If Mitigated

No impact if applications don't use the vulnerable functions or only process trusted PKCS7 data.

🌐 Internet-Facing: MEDIUM - Risk exists if internet-facing applications process untrusted PKCS7 data using vulnerable functions.
🏢 Internal Only: LOW - Lower risk for internal systems unless they process untrusted PKCS7 data from internal sources.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending malformed PKCS7 data to applications that use the vulnerable functions. No authentication needed if application accepts external PKCS7 data.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: OpenSSL 3.0.8

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

Restart Required: Yes

Instructions:

1. Download OpenSSL 3.0.8 or later from openssl.org. 2. Compile and install the new version. 3. Restart all applications using OpenSSL. 4. Recompile any statically linked applications with the patched version.

🔧 Temporary Workarounds

Disable PKCS7 processing

all

Modify applications to avoid using d2i_PKCS7 functions or validate PKCS7 data before processing

Application-specific modifications required

🧯 If You Can't Patch

  • Implement strict input validation for PKCS7 data before passing to vulnerable functions
  • Use network controls to limit PKCS7 data processing to trusted sources only

🔍 How to Verify

Check if Vulnerable:

Check OpenSSL version with 'openssl version'. If version is between 3.0.0 and 3.0.7, check if applications use d2i_PKCS7 functions.

Check Version:

openssl version

Verify Fix Applied:

Verify OpenSSL version is 3.0.8 or later with 'openssl version'. Test applications with known malformed PKCS7 data to ensure no crashes.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults when processing PKCS7 data
  • Error logs mentioning d2i_PKCS7 functions

Network Indicators:

  • Unusual PKCS7 data patterns sent to applications
  • Repeated connection attempts to services processing PKCS7

SIEM Query:

Application logs containing 'segmentation fault' OR 'SIGSEGV' AND process names using OpenSSL

🔗 References

📤 Share & Export