CVE-2026-5460
JSON

6.3medium

Heap Use-After-Free in PQC Hybrid KeyShare Error Cleanup in wolfSSL TLS 1.3

Severity
6.3medium CVSS:4.0 by wolfSSL
Exploit likelihood
0.36% (higher than 21% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
wolfSSL

Description

A heap use-after-free exists in wolfSSL's TLS 1.3 post-quantum cryptography (PQC) hybrid KeyShare processing. In the error handling path of TLSX_KeyShare_ProcessPqcHybridClient() in src/tls.c, the inner function TLSX_KeyShare_ProcessPqcClient_ex() frees a KyberKey object upon encountering an error. The caller then invokes TLSX_KeyShare_FreeAll(), which attempts to call ForceZero() on the already-freed KyberKey, resulting in writes of zero bytes over freed heap memory.

Affected

Product or packageVersionsReported by
wolfSSL wolfSSLbefore 5.9.1CVE List, NVD

All scores

wolfSSL6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Classification

CWE-416

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

A heap use-after-free exists in wolfSSL's TLS 1.3 post-quantum cryptography (PQC) hybrid KeyShare processing. In the error handling path of TLSX_KeyShare_ProcessPqcHybridClient() in src/tls.c, the inner function TLSX_KeyShare_ProcessPqcClient_ex() frees a KyberKey object upon encountering an error. The caller then invokes TLSX_KeyShare_FreeAll(), which attempts to call ForceZero() on the already-freed KyberKey, resulting in writes of zero bytes over freed heap memory.

NVD (es)

Existe un uso después de liberación de la pila en el procesamiento híbrido de KeyShare de criptografía postcuántica (PQC) de TLS 1.3 de wolfSSL. En la ruta de manejo de errores de TLSX_KeyShare_ProcessPqcHybridClient() en src/tls.c, la función interna TLSX_KeyShare_ProcessPqcClient_ex() libera un objeto KyberKey al encontrar un error. El llamador luego invoca TLSX_KeyShare_FreeAll(), que intenta llamar a ForceZero() en el KyberKey ya liberado, lo que resulta en escrituras de cero bytes sobre memoria de la pila liberada.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-5460 changed 2026-04-10CVE Terms of Use
NVDCVE-2026-5460 changed 2026-11-11Public domain