GHSA-H89V-G948-47VP
Vulnerability from github – Published: 2026-11-09 22:31 – Updated: 2026-11-09 22:31Summary
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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "moleculer"
},
"ranges": [
{
"events": [
{
"introduced": "0.15.0-beta1"
},
{
"fixed": "0.15.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "moleculer"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.14.36"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-97705"
],
"database_specific": {
"cwe_ids": [
"CWE-835"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-09T22:31:16Z",
"nvd_published_at": "2026-11-04T20:19:13Z",
"severity": "HIGH"
},
"details": "### Summary\n\nThe TCP transporter\u0027s 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 \u003e 0)` loop condition therefore never becomes false, producing an infinite synchronous loop that blocks the Node.js event loop indefinitely.\n\n### Impact\n\nAny 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\u0027s 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\u0027s 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.\n\nNeither 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.\n\n### Affected component\n\n`Parser._write` in `src/transporters/tcp/parser.js`.\n\n### Patch\n\nThe 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.\n\n### Credit\n\nReported by xor4xor via the Tidelift security program.",
"id": "GHSA-h89v-g948-47vp",
"modified": "2026-11-09T22:31:16Z",
"published": "2026-11-09T22:31:16Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/moleculerjs/moleculer/security/advisories/GHSA-h89v-g948-47vp"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-97705"
},
{
"type": "WEB",
"url": "https://github.com/moleculerjs/moleculer/commit/168ecbdc245c9a9d1dc4ef9b8a81dbae38ee3063"
},
{
"type": "WEB",
"url": "https://github.com/moleculerjs/moleculer/commit/914074e502ae403a0338ad168b45b16d6bcc3e44"
},
{
"type": "PACKAGE",
"url": "https://github.com/moleculerjs/moleculer"
},
{
"type": "WEB",
"url": "https://github.com/moleculerjs/moleculer/releases/tag/v0.14.36"
},
{
"type": "WEB",
"url": "https://github.com/moleculerjs/moleculer/releases/tag/v0.15.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "Moleculer: Unauthenticated Denial of Service via negative length field in the TCP transporter packet parser"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.