Nest: Remote process termination via a deeply nested microservice message pattern
| Field | Value | | --- | --- | | Ecosystem | npm | | Package | `@nestjs/microservices` | | Affected versions | `>= 12.0.0, < 12.0.2` and `< 11.2.4` | | Patched versions | `12.0.2` and `11.2.4` (upgrade to `12.0.3` / `11.2.5`) | ### Summary A single message whose `pattern` is a deeply nested object terminates a NestJS microservice that uses the TCP or RabbitMQ transport. The server serialized the client-supplied pattern with `JSON.stringify` to derive the handler lookup key; on deeply nested input this throws `RangeError: Maximum call stack size exceeded`. The exception escaped the asynchronous message handler as an unhandled promise rejection, which terminates the Node.js process under the default `--unhandled-rejections=throw`. ### Impact Denial of service, one message per crash, repeatable. The attacker needs to be able to reach the transport: connect to the TCP transport's port, or publish to the queue or exchange the service consumes from. The TCP transport performs no authentication by default, so on a reachable port this requires nothing else. Only the **TCP** and **RabbitMQ** transports are affected. The other transports take the pattern as a string from the broker topic or channel and never serialize a client-supplied object to build it. ### Details In `ServerTCP#handleMessage` and `ServerRMQ#handleMessage` the pattern was stringified without a guard: ```ts const pattern = isString(packet.pattern) ? packet.pattern : JSON.stringify(packet.pattern); ``` `JSON.parse` ac
GHSA-m8vh-jmq9-5rjg
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-m8vh-jmq9-5rjg
@nestjs/microservices
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 11.2.4
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
@nestjs/microservices
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 12.0.2
Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "11.2.4"
}
]
}
],
"package": {
"name": "@nestjs/microservices",
"purl": "pkg:npm/%40nestjs/microservices",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-m8vh-jmq9-5rjg/GHSA-m8vh-jmq9-5rjg.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "12.0.0"
},
{
"fixed": "12.0.2"
}
]
}
],
"package": {
"name": "@nestjs/microservices",
"purl": "pkg:npm/%40nestjs/microservices",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-m8vh-jmq9-5rjg/GHSA-m8vh-jmq9-5rjg.json"
}
}
]- Related CVEs
- CVE-2026-102281
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #33265 · Revision 1
- Added to Heist Feed
- Publisher date