GO-2026-6940: Unbounded allocation from peer-declared frame length in github.com/gobwas/ws

Published Nov 23, 2026
·
Updated

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.

Affected Software

1 affected componentFixes available
go/github.com/gobwas/ws<1.5.0
1.5.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/gobwas/ws to a version that resolves this vulnerability.

    Fixed in 1.5.0

Event History

Nov 23, 2026
Advisory Published
via OSV·08:02 PM
Data Sourced
via OSV·08:02 PM
DescriptionAffected Software

Frequently Asked Questions

1

Who can trigger the memory exhaustion condition?

A remote unauthenticated peer can trigger it by sending a frame header that declares a very large payload length. No payload bytes need to be sent before the affected readers allocate memory.

2

Which code paths are affected?

The affected paths are ws.ReadFrame, ws.MustReadFrame, and the wsutil message readers. These allocate a buffer based on the payload length declared in the frame header before reading the payload.

3

How can I tell whether an instance has been attacked?

The described impact is an out-of-memory crash following receipt of a frame with an excessively large declared payload length. Review crash and memory-exhaustion events alongside WebSocket peer traffic if available.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203