HIGH · CVSS 3.1 7.5 EPSS 0.6% · 45th percentile CWE-835

CVE-2026-97705: Moleculer: Unauthenticated Denial of Service via negative length field in the TCP transporter packet parser

Published 2026-11-09 · Updated 2026-11-09 · Also known as GHSA-h89v-g948-47vp

Summary

Moleculer's TCP transporter contains a flaw where a crafted packet with a negative length field triggers an infinite synchronous loop, resulting in a denial-of-service. Engineering teams using Moleculer with the TCP transporter should update to the patched versions immediately to prevent event loop exhaustion.

Who is affected

This vulnerability affects any Moleculer node configured with the TCP transporter, as the parser processes bytes directly from incoming sockets without authentication. An unauthenticated attacker can crash the entire Node.js event loop by sending a small, specially crafted TCP packet. This renders all services hosted in that process unresponsive until the service is manually restarted.

Exploitability

The vulnerability is rated High with a CVSS 3.1 score of 7.5, indicating it is easily exploitable over the network with no authentication or privileges required. With an EPSS score of 0.004, the probability of exploitation is currently low, and it is not documented in the CISA KEV catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm moleculer >= 0.15.0-beta1, < 0.15.2 0.15.2 npm install [email protected]
npm moleculer >= 0, < 0.14.36 0.14.36 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh

FAQ

Can I mitigate this by adjusting maxPacketSize?

No. The vulnerability arises from how the length field is parsed, and maxPacketSize limits the total buffer size rather than validating the integrity of the length header.

Is authentication required to trigger this crash?

No. The TCP transporter parses packets immediately upon connection, before any handshake or authentication protocols are performed.

Does this vulnerability impact the UDP broadcast discovery mechanism?

The vulnerability exists in the TCP transporter, which may be auto-discovered via UDP broadcast; however, the actual exploitation occurs through the established TCP connection.

Original advisory description
### Summary The TCP transporter's packet parser (`src/transporters/tcp/parser.js`) reads the packet length field with `Buffer.prototype.readInt32BE`, a signed read. A crafted packet whose length field has the sign bit set yields a negative `length`. The parser then advances past the parsed message with `packet = packet.slice(length)`, but `Buffer.prototype.slice` clamps an out-of-range negative start index to `0`, so the buffer is returned unchanged. The `while (packet.length > 0)` loop condition therefore never becomes false, producing an infinite synchronous loop that blocks the Node.js event loop indefinitely. ### Impact Any Moleculer node using the TCP transporter can be rendered completely unresponsive by an unauthenticated remote peer sending a single ~10-byte crafted TCP packet, before any protocol handshake or authentication takes place. `TcpReader.onTcpClientConnected` pipes each accepted socket's bytes straight into a fresh `Parser` instance (`socket.pipe(parser)`) with no handshake, so the code path is reachable by any peer able to reach the transporter's listening port. Because Node.js is single-threaded, the hang blocks the entire event loop of the process, taking down every service hosted in it until it is forcibly restarted. TCP transporter endpoints are frequently auto-discovered via UDP broadcast, so any host on the same network segment can reach the port. Neither the CRC check nor `maxPacketSize` mitigate the issue: the CRC bytes are fully attacker-computable, and `maxPacketSize` bounds the received buffer size, not the value of the length field. ### Affected component `Parser._write` in `src/transporters/tcp/parser.js`. ### Patch The fix validates that the decoded length is at least the 6-byte header size before processing, rejecting negative and undersized values (which would otherwise fail to shrink the buffer) with an error on the write callback instead of looping. ### Credit Reported by xor4xor via the Tidelift security program.

References

Source records: GHSA-h89v-g948-47vp (OSV.dev) · EPSS by FIRST, 2026-11-26.