Skip to main content
Vulnerability Database/CVE-2026-107928

CVE-2026-107928: curl with GnuTLS Buffer Overflow Vulnerability

CVE-2026-107928 is a buffer overflow in curl when built with GnuTLS, allowing malicious WebSocket servers to cause out-of-bounds memory reads. This article covers technical details, affected versions, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-107928 Overview

CVE-2026-107928 affects curl builds that use GnuTLS as the TLS backend when communicating with WebSocket servers. A malicious WebSocket endpoint can trigger an out-of-bounds read that causes curl to transmit memory bytes past the end of its send buffer. The root cause is a return value mismatch from gnutls_record_send(), which can report sending more bytes than it was handed after a previously blocked send. The result is unintended disclosure of adjacent process memory to a remote attacker.

Critical Impact

A hostile WebSocket server can coerce curl, when linked against GnuTLS, to leak uninitialized or adjacent heap memory contents over the wire by exploiting an out-of-bounds read in the send path.

Affected Products

  • curl built with GnuTLS as the TLS backend
  • libcurl applications performing WebSocket requests over TLS
  • Distribution packages linking curl against GnuTLS

Discovery Timeline

  • 2026-10-20 - CVE-2026-107928 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-107928

Vulnerability Analysis

The flaw is an out-of-bounds read [CWE-125] triggered in curl's WebSocket send path when GnuTLS is the active TLS backend. curl calls gnutls_record_send() to transmit framed WebSocket data over the TLS connection. Under specific conditions, GnuTLS returns a byte count larger than the length curl supplied as the write argument. curl trusts that return value as the authoritative number of bytes sent and advances its send tracking accordingly. On the next iteration curl reads past the end of the application buffer and hands the excess bytes to GnuTLS for transmission to the peer.

Because the extra bytes originate from process memory immediately following the send buffer, their contents are undefined and may include sensitive data from previous allocations. The malicious WebSocket server receives this leaked memory as part of the data stream.

Root Cause

The defect is a missing bounds check on the value returned by gnutls_record_send(). GnuTLS can report an inflated send count after a prior send was blocked and later retried. curl's WebSocket layer treats the returned count as trusted and does not clamp it against the originally requested length. This mishandling converts a library behavior quirk into a memory disclosure in the calling application.

Attack Vector

Exploitation requires the victim to initiate a WebSocket connection to an attacker-controlled server using a curl binary or libcurl-linked application built with GnuTLS. The attacker manipulates the TLS record flow to induce a blocked send followed by a retried send that returns an inflated byte count. curl then transmits data past its send buffer, delivering adjacent memory contents to the attacker. No authentication is required beyond the ability to serve the WebSocket endpoint the client contacts. See the cURL CVE-2026-107928 Documentation and the HackerOne Report #4099194 for upstream details.

Detection Methods for CVE-2026-107928

Indicators of Compromise

  • Outbound WebSocket (wss://) connections from curl or libcurl-based clients to untrusted or newly observed hosts.
  • curl builds that resolve TLS symbols from libgnutls rather than OpenSSL, wolfSSL, or Schannel.
  • Anomalous outbound TLS record sizes immediately following a client-side send retry pattern.

Detection Strategies

  • Inventory curl and libcurl installations and identify which TLS backend each build links against using curl -V.
  • Hunt for processes invoking curl with wss:// URLs or using the --websocket option in command-line telemetry.
  • Flag network egress to unexpected WebSocket endpoints from automation, CI/CD runners, and backend service accounts.

Monitoring Recommendations

  • Collect process execution and command-line arguments from endpoints that run scheduled curl jobs or scripted integrations.
  • Monitor TLS egress from server workloads to catch WebSocket sessions terminating at unapproved destinations.
  • Correlate curl version strings and linked TLS libraries during vulnerability scans to prioritize GnuTLS-backed hosts.

How to Mitigate CVE-2026-107928

Immediate Actions Required

  • Identify every curl and libcurl binary in the environment and record which TLS backend each one uses.
  • Upgrade GnuTLS-backed curl builds to the patched version referenced in the cURL CVE-2026-107928 Documentation.
  • Restrict outbound WebSocket connections from servers and automation hosts to an allowlist of known endpoints.
  • Audit applications that embed libcurl and ship vendor updates for any that bundle a vulnerable copy.

Patch Information

Refer to the upstream advisory at cURL CVE-2026-107928 Documentation and the structured cURL CVE-2026-107928 JSON Report for the fixed version range and commit references. Distribution maintainers are expected to backport the fix into supported curl packages.

Workarounds

  • Rebuild curl against an alternate TLS backend such as OpenSSL or wolfSSL where operationally feasible.
  • Avoid using the WebSocket feature of curl against untrusted servers until the host is patched.
  • Terminate outbound WebSocket traffic through a trusted proxy that enforces endpoint allowlisting.
bash
# Verify which TLS backend your curl binary links against
curl -V | tr ' ' '\n' | grep -iE 'gnutls|openssl|wolfssl|schannel'

# Example: block outbound WebSocket egress except to approved hosts
# (iptables illustration; adapt to your firewall)
iptables -A OUTPUT -p tcp --dport 443 -m string \
  --algo bm --string "Upgrade: websocket" -j REJECT

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.