Intel

AIKIDO-2026-182313

workerd is vulnerable to Buffer Underwrite (Buffer Underflow)

Buffer Underwrite (Buffer Underflow)CVE-2023-48230 Published 4 days ago

59

Medium Risk

This Affects:

JSworkerd
1.20221111.0 - 1.20231030.1
Fixed in 1.20231121.0
Are you affected? Scan for Free

TL;DR

workerd bundles the Cap'n Proto KJ HTTP library, which mishandles WebSocket frames when compression has been negotiated but an individual incoming message arrives without the compression bit set. In that case the runtime allocates buffer space for an uncompressed message but later treats the message as compressed and prepends a constant four-byte prefix, writing those bytes into the memory immediately preceding the heap-allocated buffer. A remote peer can send such a message to trigger the buffer underwrite, which typically corrupts allocator metadata and crashes the process, resulting in a denial of service. The fix corrects the compression handling so the prefix bytes are no longer written outside the buffer bounds.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your Worker accepts WebSocket connections and processes the messages with WebSocket compression enabled.

Background info

workerd is vulnerable to Buffer Underwrite (Buffer Underflow) in versions 1.20221111.0 - 1.20231030.1.

How to fix this

Upgrade the workerd library to the patch version.