SEVERITY NOT PROVIDED

GHSA-4xr6-hc3h-f6jq: Unbounded allocation from peer-declared frame length in github.com/gobwas/ws

Published 2026-11-23 · Updated 2026-11-23 · Also known as GO-2026-6940

Summary

The github.com/gobwas/ws library is vulnerable to memory exhaustion caused by unbounded allocation during frame processing. Engineering teams using this library for WebSocket communication should update to version 1.5.0 to prevent remote denial-of-service attacks.

Who is affected

Applications using ws.ReadFrame, ws.MustReadFrame, or wsutil message readers are affected. A remote unauthenticated peer can cause an out-of-memory crash by sending a frame header that declares a large payload length, triggering an immediate buffer allocation.

Exploitability

Exploitability metrics including CVSS and EPSS are not documented for this vulnerability. It is currently not listed on the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-23. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Go github.com/gobwas/ws >= 0, < 1.5.0 1.5.0 go get github.com/gobwas/[email protected]

FAQ

What is the root cause of this vulnerability?

The library allocates a memory buffer based on the payload length declared in the WebSocket frame header before actually reading any payload bytes, allowing for memory exhaustion.

Can this be exploited without authentication?

Yes, a remote unauthenticated peer can trigger the vulnerability by sending a malicious frame header.

Which specific components are affected?

The vulnerability exists in ws.ReadFrame, ws.MustReadFrame, and the message readers within the wsutil package.

Original advisory description
ws.ReadFrame, ws.MustReadFrame, and the wsutil message readers allocate a buffer of the payload length declared in the frame header before reading any payload bytes. A remote unauthenticated peer can send a frame header declaring a large payload length and cause an out-of-memory crash.

References

Source records: GO-2026-6940 (OSV.dev).