CVE-2026-42014
Awaiting Analysis Awaiting Analysis - Queue

GnuTLS Use-After-Free in PKCS#11 PIN Change

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

Publication date: 2026-06-16

Last updated on: 2026-06-30

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-30
Generated
2026-07-06
AI Q&A
2026-06-16
EPSS Evaluated
2026-07-04
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.

Detection Guidance

This vulnerability is a use-after-free issue in the GnuTLS library's gnutls_pkcs11_token_set_pin function, which occurs under specific conditions involving Security Officer PIN changes with a NULL old PIN on tokens lacking a protected authentication path.

Detection on a network or system level is not straightforward because this is a memory corruption vulnerability triggered by specific API calls rather than network traffic patterns.

To detect if your system is vulnerable, you can check the version of the GnuTLS library installed and verify if it includes the patch that fixes this issue.

Since the vulnerability involves the gnutls_pkcs11_token_set_pin function, monitoring or auditing applications that use this function with PKCS#11 tokens might help identify attempts to exploit it.

No specific commands for detection or exploitation are provided in the available resources.

Compliance Impact

The provided information does not specify any direct impact of the CVE-2026-42014 vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.

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