DEV Community

kozhevniko
kozhevniko

Posted on

1,126 zstd header matches are only the visible edge of compression dependencies

1,126 zstd header matches are only the visible edge of compression dependencies

A server can advertise Zstandard support in a response header, but the vulnerable decompressor may run in a client, a proxy, a worker, or a backup process. CVE-2026-124851 affects zstd 1.5.1 through 1.5.7 and can expose data from a reused 64 KiB internal buffer.

I queried ZoomEye with http.header="zstd" at 2026-11-30T17:53:32Z. The count-only request used sub_type=all, page 1, and page size 1. It returned 1,126 matches. A broader http.header="Content-Encoding" query returned 69,454,583. The second count covers many encodings and is not a zstd population.

The vulnerability is contextual. A crafted compressed stream can expose uninitialized bytes or literals from an earlier decompression in the same context. Fresh-per-request contexts have less history; long-lived workers can cross jobs or tenants. Services that accept compressed uploads and return or log output are more relevant than a static server that only negotiates response compression.

Use the visible zstd matches as a discovery lead for proxies, API gateways, file processors, and observability services. Confirm the loaded library version with a package inventory and runtime linker information. Search container images and vendored modules because the command-line zstd package may be newer than an application's embedded copy.

Upgrade to zstd 1.6.0 or a vendor backport. Restart long-lived processes so the new library is loaded. Audit application code that keeps a decompression context across requests. Add compressed and decompressed size limits, request concurrency limits, and output logging rules that avoid recording secrets from decompressed bodies.

Test a long-lived worker with repeated decompressions and malformed inputs. Confirm that failed output does not include bytes from the previous job. Preserve compressed input, worker identity, version, and adjacent request metadata if a leak is suspected. Rotate secrets that may have appeared in prior output and reached logs.

The header count is not a vulnerability count. Many systems use zstd without exposing it, and an advertised header may terminate at an edge proxy that uses a separate implementation. Store the exact query and date. The software inventory and a context-reuse test provide the closure evidence.

References

Top comments (1)

Collapse
 
userxnom profile image
Abdullah Naseer •

The distinction you draw between the two counts is the whole post for me — 1,126 matches for http.header="zstd" versus 69,454,583 for the broader Content-Encoding query, and you are explicit that the second number is not a zstd population at all. Too many exposure write-ups would have led with the bigger number.

The other point worth underlining is that the vulnerable decompressor may not even be the server advertising the header. A proxy, a gateway, a worker or a backup process can be the one doing the decompressing, and the package version can be newer than the embedded copy an application actually loads — which is why your note about restarting long-lived processes matters, not just upgrading.

When you triage a lead from those 1,126, what do you check first to separate the interesting ones — whether the service accepts compressed uploads, since that is where a crafted stream actually gets decompressed, or something else? And for a long-lived worker, is there a reliable way you check which zstd copy is really loaded at runtime, rather than trusting the package manifest?