CVE-2026-42014
Received Received - Intake
GnuTLS Use-After-Free in PKCS#11 PIN Change

Publication date: 2026-06-16

Last updated on: 2026-06-16

Assigner: Red Hat, Inc.

Description
A flaw was found in GnuTLS. The `gnutls_pkcs11_token_set_pin` function, used for changing the Security Officer PIN, can lead to a use-after-free vulnerability. This occurs when an attacker attempts to change the PIN with a NULL old PIN for a token that lacks a protected authentication path.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-16
Last Modified
2026-06-16
Generated
2026-06-16
AI Q&A
2026-06-16
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
gnutls gnutls From 3.0.0 (inc) to 3.13.0 (inc)
red_hat red_hat_enterprise_linux 9
red_hat red_hat_enterprise_linux 10
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-825 The product dereferences a pointer that contains a location for memory that was previously valid, but is no longer valid.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability is a use-after-free flaw in the GnuTLS library, specifically in the function gnutls_pkcs11_token_set_pin. It occurs when an attacker tries to change the Security Officer PIN by calling this function with the old PIN set to NULL on a token that does not have a protected authentication path.

In this scenario, the PKCS#11 URI is freed too early after opening a session, but it is later reused during the PIN retrieval process. This premature freeing leads to a heap use-after-free condition, which can cause memory corruption or process crashes if exploited.

The issue arises because the URI should remain valid until after the PIN retrieval completes, but the current code frees it too soon. A fix involves deferring the freeing of the URI until it is no longer needed.

Impact Analysis

This vulnerability can lead to memory corruption or process crashes in applications using the affected GnuTLS function. An attacker exploiting this use-after-free flaw could cause denial of service by crashing the process.

Under precise heap manipulation, it might be possible for an attacker to execute more advanced exploits, potentially leading to further compromise of the system or application using GnuTLS.

Mitigation Strategies

To mitigate the use-after-free vulnerability in the gnutls_pkcs11_token_set_pin function, you should apply the patch or update provided by the GnuTLS maintainers that defers freeing the PKCS#11 URI until after all its uses are complete.

Since the vulnerability occurs when changing the Security Officer PIN with a NULL old PIN on tokens lacking a protected authentication path, avoid performing such PIN changes until the fix is applied.

Monitor for updates from your Linux distribution or GnuTLS project and apply security updates promptly once available.

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