CVE-2026-107493
Received Received - Intake

Use After Free in OpenSSL PEM_X509_INFO_read_bio_ex

Vulnerability report for CVE-2026-107493, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-17

Last updated on: 2026-11-17

Assigner: OpenSSL Software Foundation

Description

Issue summary: When an application passes a stack to PEM_X509_INFO_read_bio_ex() to add entries to, and reading fails, OpenSSL frees every entry in the stack, both the old ones and any new ones, but leaves them in the stack. Impact summary: An application that passes an existing stack to PEM_X509_INFO_read_bio_ex() and keeps using it after a failed read may use memory that was already freed. This can cause a crash or, in principle, memory corruption. Malformed PEM data can make the read fail, but only applications that pass an existing stack are affected, and OpenSSL itself does not do this. CWE: CWE-416: Use After Free Description: PEM_X509_INFO_read_bio_ex() reads certificates, CRLs and private keys from PEM data and adds them to a stack of X509_INFO structures. If the application passes a stack that is not NULL, the function adds the new entries to it and must leave the entries that are already there unchanged. If reading fails, the function frees every entry in the stack. This includes the entries that were there before the call, and the entries added by the call. It does not remove these entries from the stack, so the stack keeps pointers to freed memory. The failure can happen at any point, even before any entry was added. A PEM item with invalid content is enough. This also happens if the stack was empty: entries added before the failure are freed but stay in the stack. An application that then reads or frees the stack will use memory that was already freed. This can crash the application or, in principle, corrupt memory. Only applications that pass a stack that is not NULL are affected. OpenSSL itself never does this. Its own callers, including the code that TLS uses to load CA certificates, always pass NULL. When the stack is NULL, the function frees only the entries that it created itself, which is safe. We expect that very few applications pass an existing stack. An attacker can make the read fail with malformed PEM data, but cannot make an application pass an existing stack. The same problem affects PEM_X509_INFO_read_bio(), PEM_X509_INFO_read() and PEM_X509_INFO_read_ex(), which use the same code. OpenSSL 1.1.1 and 1.0.2 have only the first two of these functions. FIPS impact: no The affected code is outside the FIPS module boundary.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-17
Last Modified
2026-11-17
Generated
2026-11-17
AI Q&A
2026-11-17
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 6 associated CPEs

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a use-after-free vulnerability in OpenSSL's PEM_X509_INFO_read_bio_ex() function. When an application passes a non-empty stack to add entries and the read operation fails, the function incorrectly frees all entries in the stack, including those already owned by the caller, but leaves them in the stack. This leaves pointers to freed memory, which can cause crashes or memory corruption if the application continues to use the stack.

Detection Guidance

This vulnerability affects applications using OpenSSL's PEM_X509_INFO_read_bio_ex() function with an existing stack. Detection requires checking if your applications call this function with a non-NULL stack and handle PEM data. No direct network detection exists; inspect application code and logs for crashes or memory corruption after PEM parsing failures.

Impact Analysis

If you use an application that passes an existing stack to PEM_X509_INFO_read_bio_ex() and the read fails due to malformed PEM data, the application may crash or experience memory corruption. This could lead to denial of service or potentially allow arbitrary code execution in rare cases.

Mitigation Strategies
  • Upgrade OpenSSL to the latest patched version (4.1, 4.0, 3.5, 3.0, 1.1.1, or 1.0.2) to address the memory management flaw in PEM_X509_INFO_read_bio_ex().
  • Review applications using OpenSSL's PEM functions to ensure they do not pass existing stacks to PEM_X509_INFO_read_bio_ex().
  • Test patched versions in a non-production environment before full deployment to verify compatibility.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-107493. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...