CVE-2025-9820: Gnutls: stack-based buffer overflow in gnutls_pkcs11_token_init() function

Published Sep 2, 2025
·
Updated

A flaw was found in the GnuTLS library, specifically in the gnutlspkcs11tokeninit() function that handles PKCS#11 token initialization. When a token label longer than expected is processed, the function writes past the end of a fixed-size stack buffer. This programming error can cause the application using GnuTLS to crash or, in certain conditions, be exploited for code execution. As a result, systems or applications relying on GnuTLS may be vulnerable to a denial of service or local privilege escalation attacks.

Other sources

Stack-based buffer overflow vulnerability in the PKCS#11 token initialization function gnutlspkcs11tokeninit() of the GnuTLS library. The flaw is caused by an unsafe memcpy into a fixed-size stack buffer (flabel[32]) without proper bounds checking. If an attacker provides a token label longer than 32 bytes, it leads to out-of-bounds memory writes, causing a crash or, in some environments, potential code execution. Although the vulnerability requires local access or interaction with a malicious PKCS#11 token, it poses a security risk by enabling denial-of-service or possible privilege escalation in applications relying on GnuTLS.

Red Hat

Affected Software

6 affected componentsFixes available
GNUTLS GNUTLS=3.8.11
debian/gnutls28<=3.7.1-5+deb11u5
3.7.1-5+deb11u103.7.9-2+deb12u63.7.9-2+deb12u73.8.9-3+deb13u33.8.9-3+deb13u43.8.13-1
IBM Verify Identity Access<=11.0 - 11.0.2
IBM Security Verify Access<=10.0 - 10.0.9.1
IBM Verify Identity Access Container<=11.0 - 11.0.2
IBM Security Verify Access Container<=10.0 - 10.0.9.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/gnutls28 to a version that resolves this vulnerability.

    Fixed in 3.7.1-5+deb11u10Fixed in 3.7.9-2+deb12u6Fixed in 3.7.9-2+deb12u7Fixed in 3.8.9-3+deb13u3Fixed in 3.8.9-3+deb13u4Fixed in 3.8.13-1
  2. Upgrade

    Upgrade GnuTLS to a version that resolves this vulnerability.

    Fixed in 3.8.11Patch CVE-2025-9820
  3. Compensating control

    Restrict local access/interaction with PKCS#11 tokens (and token label injection) to reduce the risk of denial-of-service or possible privilege escalation in applications relying on GnuTLS.

Event History

Sep 2, 2025
Data Sourced
via Red Hat·10:07 AM
DescriptionSeverityAffected Software
Jan 26, 2026
CVE Published
via MITRE·07:58 PM
Data Sourced
via MITRE·07:58 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 PM
DescriptionSeverityWeakness
Jul 7, 2026
Data Sourced
via Ubuntu·04:33 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·04:35 PM
DescriptionAffected Software
Data Sourced
via Launchpad·04:35 PM
Description
Jul 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-9820?

CVE-2025-9820 has a high severity due to the potential for stack-based buffer overflow vulnerabilities.

2

How do I fix CVE-2025-9820?

To fix CVE-2025-9820, upgrade GnuTLS to version 3.8.12 or later, where this issue is resolved.

3

Which versions of GnuTLS are affected by CVE-2025-9820?

GnuTLS versions 3.8.11 and earlier are affected by CVE-2025-9820.

4

What could be the impact of exploiting CVE-2025-9820?

Exploiting CVE-2025-9820 could allow an attacker to execute arbitrary code or crash the application.

5

Does CVE-2025-9820 affect PKCS#11 token operations?

Yes, CVE-2025-9820 specifically affects the PKCS#11 token initialization process within the GnuTLS library.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203