@fastify/reply-from@12.9.0

forward your HTTP request to another server, for fastify

  • latest version

    12.9.2

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    9 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @fastify/reply-from 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
    • C
    HTTP Request Smuggling

    @fastify/reply-from is a forward your HTTP request to another server, for fastify

    Affected versions of this package are vulnerable to HTTP Request Smuggling via the handleDest function in index.js, which forwards the client's Content-Length header to the upstream server even when no body is written. This occurs for GET, HEAD, or TRACE requests that carry a body (which Fastify does not read), and for JSON bodies that parse to a falsy value (null, 0, false, or ""), where a truthiness check causes the body to be silently dropped. The upstream server then waits for bytes that never arrive and reads the next request on the keep-alive connection as the tail of the previous body, allowing an unauthenticated attacker to desynchronize the connection, smuggle arbitrary HTTP requests past the proxy's routes, hooks, and authentication, reach upstream-only endpoints, and exhaust the upstream connection pool.

    Note: This is only exploitable when using the core Node.js http transport (the http option, undici: false, or any release before 5.0.0 where it was the default); the default undici transport and the HTTP/2 path are not affected.

    How to fix HTTP Request Smuggling?

    Upgrade @fastify/reply-from to version 12.9.1 or higher.

    <12.9.1