Go Vulnerability Database
GO-2026-6888
Excessive memory allocation when decompressing crafted streams in github.com/andybalholm/brotli
Details
In github.com/andybalholm/brotli before v1.2.7, the decompressor allocates memory for Huffman tables and block-type trees on every meta-block header without bounding the cumulative allocations relative to the input size. A small crafted brotli stream containing many empty meta-blocks with new Huffman trees can trigger hundreds of megabytes of allocations per kilobyte of input, leading to denial of service.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | github.com/andybalholm/brotli | All versions before 1.2.7 (fixed in 1.2.7) |