@trpc/server@11.1.0 vulnerabilities

The tRPC server library

  • latest version

    11.1.2

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    21 days ago

  • licenses detected

  • Direct Vulnerabilities

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

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Uncaught Exception

    @trpc/server is a The tRPC server library

    Affected versions of this package are vulnerable to Uncaught Exception via the createCtxPromise function. An attacker can cause the server to crash by sending malformed connectionParams during the WebSocket connection setup. Specifically, the parseConnectionParams function throws an error for malformed input, which is caught but then incorrectly re-thrown within the WebSocket adapter's createCtxPromise function. This re-thrown error becomes an uncaught exception in the WebSocket message event context, leading to the termination of the entire tRPC server process.

    Note: This is only exploitable if the server has WebSockets enabled and uses the createContext method.

    How to fix Uncaught Exception?

    Upgrade @trpc/server to version 11.1.1 or higher.

    <11.1.1