Advisory

GO-2025-4012

Also known as: BIT-golang-2025-58186, CVE-2025-58186

Summary

Lack of limit when parsing cookies can cause memory exhaustion in net/http

Details

Despite HTTP headers having a default limit of 1MB, the number of cookies that can be parsed does not have a limit. By sending a lot of very small cookies such as "a=;", an attacker can make an HTTP server allocate a large amount of structs, causing large memory consumption.

Severity

Not rated by the source.

Dates

Published
2025-10-29 21:50 UTC
Modified
2026-05-15 10:59 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.24.8, introduced 1.25.0, fixed 1.25.2 (semver)

Fixed versions

1.24.8, 1.25.2

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences