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

CVE-2026-78667: Go HTTP Server DOS Vulnerability

CVE-2026-78667 is a denial of service vulnerability in Go's HTTP server affecting FileServer, ServeContent, and ServeFile functions when parsing Range headers with numerous small ranges. This post covers technical details, affected versions, impact assessment, and mitigation strategies.

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-78667 Overview

CVE-2026-78667 is a denial-of-service vulnerability in the Go standard library's net/http package. The flaw affects FileServer, FileServerFS, ServeContent, ServeFile, and ServeFileFS handlers. When these handlers parse an HTTP Range header containing a large number of small byte ranges, they consume excessive CPU resources. A remote, unauthenticated attacker can send a crafted request to degrade or exhaust service availability. The issue is tracked upstream as GO-2026-6609 and is categorized under [CWE-770] (Allocation of Resources Without Limits or Throttling).

Critical Impact

A single crafted HTTP request can trigger sustained CPU exhaustion on Go-based web servers that expose static-file endpoints, enabling network-based denial of service without authentication.

Affected Products

  • Go standard library net/http package — FileServer and FileServerFS
  • Go standard library net/http package — ServeContent
  • Go standard library net/http package — ServeFile and ServeFileFS

Discovery Timeline

  • 2026-10-08 - CVE-2026-78667 published to NVD
  • 2026-10-09 - Last updated in NVD database

Technical Details for CVE-2026-78667

Vulnerability Analysis

The vulnerability resides in the HTTP Range header parsing logic used by Go's static-file serving handlers. HTTP range requests allow clients to request specific byte ranges of a resource, and the server must enumerate and validate each range before returning a multipart/byteranges response.

When a Range header contains a very large number of small ranges, the parsing and bookkeeping path scales poorly. The affected handlers process each range entry without an effective upper bound on CPU work, which allows a small request body to translate into substantial server-side computation.

The weakness maps to [CWE-770], where resource allocation proceeds without throttling or quotas. Because the attack is purely network-based and requires no authentication or user interaction, any publicly reachable Go HTTP service that serves files is reachable by this attack surface.

Root Cause

The root cause is unbounded work performed while iterating ranges parsed from the Range header. The handlers accept arbitrarily long range lists and perform per-range processing, which produces superlinear CPU cost on pathological inputs. The upstream fix in Go change 847309 adjusts range parsing to limit the work performed and reject abusive inputs. Additional context is available in the Go issue tracker.

Attack Vector

Exploitation requires only the ability to send an HTTP request to an endpoint that invokes FileServer, ServeContent, ServeFile, or their FS variants. The attacker sets a Range header listing many small byte ranges, for example thousands of entries over a modest file. Each request causes the handler to burn CPU cycles. Repeated requests, or many in parallel, can saturate server cores and cause the service to stop responding to legitimate traffic.

No authentic code examples have been published. See the Golang announcement for upstream guidance.

Detection Methods for CVE-2026-78667

Indicators of Compromise

  • HTTP requests with abnormally long Range headers, often containing hundreds or thousands of comma-separated byte-range specifiers.
  • Sustained spikes in CPU utilization on Go HTTP services correlated with inbound requests to static-file routes.
  • Elevated request latency or 5xx responses from endpoints backed by FileServer, ServeContent, or ServeFile.

Detection Strategies

  • Inspect reverse-proxy and web-server access logs for requests whose Range header length exceeds a conservative threshold such as 1 KB.
  • Correlate per-process CPU metrics for Go services with inbound request patterns to identify repeat offenders by source IP or user agent.
  • Use web application firewall (WAF) rules to flag or count Range headers containing more than a small number of range specifiers.

Monitoring Recommendations

  • Alert on sudden sustained CPU saturation on Go-based HTTP workloads, especially those exposing file downloads.
  • Track request-rate and header-size distributions at the edge and alert on statistical outliers.
  • Capture full HTTP request headers for a sampled subset of traffic to enable retrospective hunting for abusive Range values.

How to Mitigate CVE-2026-78667

Immediate Actions Required

  • Upgrade affected services to a Go toolchain release that includes the fix referenced in GO-2026-6609 and rebuild all binaries that import net/http.
  • Inventory internal and external services that use http.FileServer, http.ServeContent, or http.ServeFile and prioritize internet-exposed instances.
  • Deploy edge rate limits and header-size limits on reverse proxies in front of Go services as a compensating control.

Patch Information

The upstream fix is tracked in Go change 847309, with release coordination announced on the golang-announce group. Rebuild and redeploy any Go binaries after upgrading the toolchain, since the net/http package is statically linked into each application. Container images and third-party Go applications must also be rebuilt or updated by their maintainers.

Workarounds

  • Terminate HTTP in front of Go services with a reverse proxy such as NGINX or Envoy and strip or reject Range headers that contain more than a small number of ranges.
  • Enforce a maximum Range header length at the WAF or load balancer, dropping requests that exceed it before they reach the application.
  • Apply per-source request rate limits on endpoints that serve static files to reduce the impact of repeated abusive requests.
bash
# Example NGINX snippet to drop long Range headers before proxying to a Go backend
map $http_range $range_too_long {
    default 0;
    "~^.{512,}$" 1;
}

server {
    listen 443 ssl;
    location / {
        if ($range_too_long) { return 400; }
        proxy_pass http://go_backend;
    }
}

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.