CVE-2025-9820
GnuTLS vulnerability analysis and mitigation

Overview

CVE-2025-9820 is a stack-based buffer overflow vulnerability in the GnuTLS library, specifically in the gnutls_pkcs11_token_init() function responsible for PKCS#11 token initialization. When a token label exceeding 32 characters is passed to this function, it performs an unsafe memcpy into a fixed-size stack buffer (flabel[32]) without proper bounds checking, writing past the buffer boundary. The vulnerability was reported by Luigino Camastra from Aisle Research, disclosed on November 18, 2025 (GNUTLS-SA-2025-11-18), and published to NVD on January 26, 2026. Affected software includes GnuTLS versions prior to 3.8.11, as well as downstream products including Oracle Solaris 11.4, Red Hat Enterprise Linux 8/9/10, IBM MQ container images, IBM Db2 on Cloud Pak for Data, and IBM CICS Transaction Gateway. It carries a CVSS v3.1 base score of 4.0 (Medium) (GnuTLS Advisory, Oracle Advisory, Red Hat Bugzilla).

Technical details

The root cause is classified as CWE-121 (Stack-based Buffer Overflow). The gnutls_pkcs11_token_init() function allocates a fixed 32-byte stack buffer (flabel[32]) to hold a PKCS#11 token label, but performs a memcpy without validating that the input label length does not exceed this limit. Since the PKCS#11 standard itself imposes a 32-character label limit, the GnuTLS documentation did not clearly communicate that callers must enforce this constraint before invoking the function. The attack vector is local (AV:L), requiring no privileges (PR:N) and no user interaction (UI:N); an attacker must be able to supply a malicious PKCS#11 token or control the label passed to the function. The fix was committed to the GnuTLS GitLab repository and the issue was tracked as GitLab issue #1732 (oss-security, GnuTLS commit).

Impact

Successful exploitation can cause applications using GnuTLS to crash, resulting in a denial of service. In certain conditions — particularly where stack layout and memory protections are favorable — a local attacker without elevated privileges could potentially leverage the out-of-bounds stack write to achieve arbitrary code execution and local privilege escalation. The vulnerability affects any application or service that relies on GnuTLS for PKCS#11 token initialization, including cryptographic middleware, TLS-enabled services, and enterprise software such as IBM MQ and Db2 containers (Red Hat Bugzilla, Feedly).

Mitigation and workarounds

The primary remediation is to upgrade GnuTLS to version 3.8.11 or later, which includes the fix for this vulnerability (oss-security). As a compile-time mitigation, building the GnuTLS library with -D_FORTIFY_SOURCE=2 will effectively mitigate the issue by detecting the out-of-bounds write at runtime. Application developers should also validate that any PKCS#11 token label passed to gnutls_pkcs11_token_init() does not exceed 32 characters before invoking the function. Vendor-specific patches are available from Red Hat (RHSA-2026:3477 for RHEL 10, RHSA-2026:4188 for RHEL 9, RHSA-2026:5585 for RHEL 8), Oracle (Solaris 11.4), Debian, Ubuntu (USN-8043-1), SUSE, Fedora, Slackware, and IBM for affected products (Red Hat RHSA-2026:3477, Oracle Advisory). Restricting local access to systems running vulnerable GnuTLS implementations provides an additional layer of defense.

Community reactions

The GnuTLS project disclosed the vulnerability via its official security advisory (GNUTLS-SA-2025-11-18) and announced the fix in the GnuTLS 3.8.11 release notes, crediting the reporter Luigino Camastra from Aisle Research (oss-security). The vulnerability received broad coverage across Linux distribution security channels, with advisories issued by Red Hat, Oracle, Debian, Ubuntu, SUSE, Fedora, Slackware, Mageia, and AlmaLinux. Community reaction has been measured given the low CVSS score and local-only attack vector, with no significant controversy or elevated concern noted in social media or security forums.

Additional resources


SourceThis report was generated using AI

Related GnuTLS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-5260HIGH8.2
  • GnuTLS logoGnuTLS
  • rhcos-ppc64le
NoYesMay 26, 2026
CVE-2026-42013HIGH8.2
  • GnuTLS logoGnuTLS
  • gnutls28
NoYesMay 26, 2026
CVE-2026-42014MEDIUM6.6
  • GnuTLS logoGnuTLS
  • gnutls
NoYesJun 16, 2026
CVE-2026-42015MEDIUM5.3
  • GnuTLS logoGnuTLS
  • gnutls-dane-debuginfo
NoYesMay 26, 2026
CVE-2026-5419LOW3.7
  • GnuTLS logoGnuTLS
  • gnutls.src
NoYesJun 01, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management