@nestjs/microservices@6.7.0

Nest - modern, fast, powerful node.js web framework (@microservices)

  • latest version

    12.1.2

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    8 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @nestjs/microservices package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Allocation of Resources Without Limits or Throttling

    @nestjs/microservices is a Nest - modern, fast, powerful node.js web framework (@microservices)

    Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via unbounded memory growth in the TCP transport layer of JsonSocket. On the receiving side, a peer can declare a packet length, send a partial payload, and then go silent, causing the partial packet to remain buffered indefinitely for as long as the socket stays open, with no cap on the number of such connections. On the sending side, the return value of socket.write is discarded, so a peer that issues requests without reading responses causes the process to queue every response in memory without limit. An attacker controlling a TCP peer can exploit both paths to exhaust the process heap.

    How to fix Allocation of Resources Without Limits or Throttling?

    Upgrade @nestjs/microservices to version 11.2.5, 12.0.3 or higher.

    <11.2.5>=12.0.0 <12.0.3
    • H
    Uncaught Exception

    @nestjs/microservices is a Nest - modern, fast, powerful node.js web framework (@microservices)

    Affected versions of this package are vulnerable to Uncaught Exception via unguarded JSON.stringify calls on client-controlled message patterns in the TCP and RMQ server handlers (ServerTCP.handleMessage and ServerRMQ.handleMessage). An attacker can send a message with a deeply nested pattern object, causing JSON.stringify to throw a RangeError. Because the resulting promise rejection is left unhandled, the Node.js process terminates.

    How to fix Uncaught Exception?

    Upgrade @nestjs/microservices to version 11.2.4, 12.0.2 or higher.

    <11.2.4>=12.0.0-alpha.0 <12.0.2
    • H
    Uncontrolled Recursion

    @nestjs/microservices is a Nest - modern, fast, powerful node.js web framework (@microservices)

    Affected versions of this package are vulnerable to Uncontrolled Recursion through the handleData() function in packages/microservices/helpers/json-socket.ts. An attacker can crash the TCP microservice by sending a large burst of pipelined "<len>#<json>" frames in a single read, causing recursive frame processing to exhaust the call stack and terminate the connection. When the service processes untrusted TCP input, a crafted stream of many small valid frames can bring down the microservice and prevent it from responding to subsequent requests.

    How to fix Uncontrolled Recursion?

    Upgrade @nestjs/microservices to version 11.1.19 or higher.

    <11.1.19