# GHSA-JXJC-5HW5-PV2X: Unauthenticated denial of service of the Realtime daemon via malformed client input

- Database: GitHub
- Severity: CVSS 8.7 (High)
- Published: 2026-11-28
- Modified: 2026-11-28

## Affected versions

- flarum/realtime (Packagist): from 2.0.0-beta.5, fixed in 2.0.3
- flarum/realtime (Packagist): from 2.1.0-beta.1, fixed in 2.1.0-beta.2.1

## Description

### Summary

A single malformed websocket frame or HTTP request from a visitor stops the Realtime extension's daemon (`flarum/realtime`), disconnecting every connected user. No account and no signature are needed.

### Details

For `pusher:` events, `extensions/realtime/src/Websocket/Message/ProtocolMessage.php` turns the rest of the event name into a method name and calls it with the frame's `data` value. `subscribe()` and `unsubscribe()` declare that argument as `stdClass`, so a frame whose `data` is a string makes PHP throw a `TypeError`. Ratchet's server catches only `\Exception` around message handling; a `TypeError` is an `\Error`, so it ends the daemon process. Other frame shapes end it the same way: a channel that is a list, or an event that is a list. Sending a frame needs only the app key, which is public in the forum payload, and an `Origin` header naming the forum host, which a non-browser client sets itself.

Two other inputs end the process the same way, before any key or signature is checked:

- a request to the daemon's HTTP interface (`/apps/1/...`) with a `Content-Length` header that is not a number (`Connection/Controller.php`, `contentLength()`);
- a websocket handshake whose `appKey` query parameter is a list, such as `appKey[]=x` (`Server/QueryParams.php`, `get()`).

The fix checks the shape of each frame before use (event a string, data an object naming a string channel), dispatches only to the named protocol handlers (`ping`, `subscribe`, `unsubscribe`), and reads query parameters and `Content-Length` only in the expected shape. As a backstop, the daemon's HTTP server now closes only the offending connection if handling its input raises an error.

### Proof of concept

On a forum with Realtime enabled and its daemon running:

1. Read the app key from the forum payload.
2. Open a websocket to the daemon with that key and an `Origin` header naming the forum host.
3. Send `{"event":"pusher:subscribe","data":"x"}`.

The daemon exits with `Uncaught TypeError: ...ProtocolMessage::subscribe(): Argument #2 ($payload) must be of type stdClass, string given`, and every other client is disconnected.

Without any key, `POST /apps/1/events` with the header `Content-Length: abc`, or a websocket handshake to `/app/x?appKey[]=x`, ends the process the same way.

### Impact

Any visitor can stop realtime updates (new posts, notifications, typing indicators) for every user, and keep them stopped by sending the frame again each time a supervisor restarts the daemon. The forum itself keeps working: pages load and posting works without realtime updates.

### Patches

Fixed in `flarum/realtime` **2.0.3** (Flarum 2.0) and **2.1.0-beta.2.1** (Flarum 2.1 beta). Update, then restart the daemon with your process manager (or stop and start `php flarum realtime:serve`):

```
composer update flarum/realtime
```

### Workarounds

None short of disabling the Realtime extension (or stopping its daemon) until you can update.

### References

- CWE-20: Improper Input Validation
- CWE-248: Uncaught Exception
- Affected files: `extensions/realtime/src/Websocket/Message/ProtocolMessage.php`, `extensions/realtime/src/Websocket/Message/Factory.php`, `extensions/realtime/src/Websocket/Connection/Controller.php`, `extensions/realtime/src/Websocket/Server/QueryParams.php`

## References

- https://github.com/flarum/framework/security/advisories/GHSA-jxjc-5hw5-pv2x

Page: https://cve.now/GHSA-JXJC-5HW5-PV2X

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
