fastify is vulnerable to Uncaught Exception
59
CVE Score
Medium
Uncaught Exception
Before the fix, when a route's streaming response had already written its headers, Fastify's handlerTimeout timer still called reply.send(err), which retried writing the headers and raised an uncaught ERR_HTTP_HEADERS_SENT that terminated the Node.js process. An unauthenticated client could crash the server by holding one request open past the timeout on a streaming route. This requires a nonzero handlerTimeout, since the default 0 never arms the timer. The fix checks reply.raw.headersSent and destroys the in-flight response instead of sending an error.
Upgrade the fastify package to 5.12.8 or later.
You are affected if you are using a version that falls within the vulnerable range and set a nonzero handlerTimeout and expose a streaming route that an unauthenticated client can hold open past the timeout.
5.8.0 - 5.12.7
Fixed in 5.12.8fastify is vulnerable to Uncaught Exception in versions 5.8.0 - 5.12.7.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.