Burp Suite User Forum

Create new post

WebSocket messages being truncated to 4096 bytes

xx | Last updated: Dec 21, 2022 02:23PM UTC

Hello! I'm using websocket handlers in my extension, and all binary messages (passed to me as bytearrays) I receive are truncated to 4096 bytes. Obviously this breaks functionality in my extension when the server sends messages larger than that. Both `message.length()` and `message.bytes.size` return 4096 (provided code in Kotlin). As a side note, how would one send binary messages? There is a `sendTextMessage()` that accepts a String value, but no binary equivalent for bytearrays.

Michelle, PortSwigger Agent | Last updated: Dec 22, 2022 10:19AM UTC

Thanks for taking the time to report these issues. We've raised a bug regarding the messages being truncated and a feature request to look at handling binary messages. We'll discuss these further with the team in the new year and will post back here when there are any updates.

Michelle, PortSwigger Agent | Last updated: Jan 04, 2023 03:02PM UTC

Hi We've been taking a closer look at the issues with the larger WebSocket messages that you raised. We're having problems replicating the problem at the moment. Could you send an email to support@portswigger.net with some details on your specific example so we can look into his further for you, please?

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.