Community
Mercure 0.24.2 is a security hardening release. It closes an SSE field-injection vector (CWE-93), blocks forgery of the hub's reserved subscription-event topics, fixes a metadata leak in history replay, and adds count caps that defang several denial-of-service amplification vectors. Every hub operator should upgrade.
🔒 Security
- SSE field injection via
idandtype(CWE-93). The publish form fieldsidandtypewere copied verbatim into the outgoing SSE stream; a CR, LF, or NUL let an authorized publisher inject arbitraryevent:/id:/data:lines into every subscriber's stream. The hub now rejects such values with400 Bad Request. by @dunglas in #1259 - Reserved topic namespace forgery. Publishes targeting
/.well-known/mercure— the namespace the hub uses for its own subscription events — were dispatched, letting a broad-scope publisher forge subscription lifecycle events to other subscribers. Now rejected with403 Forbidden. by @dunglas in #1259 Last-Event-IDmetadata disclosure. On reconnect with an unknownLast-Event-ID, the response header echoed the most recent event ID even when that event was a private update the subscriber wasn't authorized to read. The history scan now applies the authorization match before setting the header. by @dunglas in #1259- Denial-of-service amplification caps. Transport byte limits bound request size but not parsed element counts: a 1 MiB JWT fits ~30k matchers, a long URL thousands of topic params — each multiplying per-event work for every subscriber. New caps (default
1000) on JWT claim matchers (401), subscribetopicparams (400), and publishtopicfields (400), plus a10000-event cap on theLast-Event-IDbackward history scan. by @dunglas in #1259, #1260
📖 Documentation & API
Update.Validateis now exported. Library callers that dispatch through aTransportdirectly bypassHub.Publish, where the CR/LF/NUL validation lives.Update.Validateis now public andTransport.Dispatchdocuments that direct callers must call it and reject on error. by @dunglas in #1266- SECURITY.md documenting the maintenance and disclosure policy. by @dunglas in #1257
Enterprise
Mercure Enterprise (on-premise) and Mercure Cloud pick up the same hardening fixes: SSE field-injection rejection, reserved-topic forgery blocking, the Last-Event-ID disclosure fix, and the DoS amplification caps. Cloud tenants are being rolled onto this release; on-premise customers should upgrade to the matching hub build.
These fixes ship under the Enterprise SLA, with prioritized patches and direct support. Contact contact@mercure.rocks for the managed Cloud offering, on-premise licenses, custom development, consulting, and training.
Full Changelog: v0.24.1...v0.24.2