Fastify — это веб-фреймворк для Node.js. В версиях 5.8.0 до 5.12.7, когда сервер настроен с ненулевым handlerTimeout и маршрут возвращает потоковый ответ, запрос, чей поток уже отправил свои заголовки, но остается открытым после таймаута, сбивает сервер. Когда тайм-аут запускается, Fastify пытается отправить новый ответ на ошибку, который уже начался, вызывая непойманный ERR_HTTP_HEADERS_SENT, который прекращает процесс Node.js и прерывает любые другие запросы в полете.
Непроверенный удаленный клиент может инициировать это с помощью одного запроса к затронутой потоковой конечной точке, поэтому воздействие только на доступность, а эксплуатация требует установки не по умолчанию handlerTimeout. По умолчанию handlerTimeout из 0 не затрагивается. Проблема исправлена в fastify 5.12.8, и пользователи должны обновиться до 5.12.8 или более поздней версии.
В качестве обходного пути установите handlerTimeout на 0, что отключит затронутый путь тайм-аута.
Показать оригинальное описание (EN)
fastify is a web framework for Node.js. In versions 5.8.0 through 5.12.7, when the server is configured with a nonzero handlerTimeout and a route returns a streaming response, a request whose stream has already sent its headers but stays open past the timeout crashes the server. When the timeout fires, Fastify tries to send a new error response on a response that has already started, raising an uncaught ERR_HTTP_HEADERS_SENT that terminates the Node.js process and interrupts any other in-flight requests. An unauthenticated remote client can trigger this with a single request to an affected streaming endpoint, so the impact is availability only, and exploitation requires the non-default handlerTimeout to be set. The default handlerTimeout of 0 is not affected. The issue is fixed in fastify 5.12.8, and users should upgrade to 5.12.8 or later. As a workaround, set handlerTimeout to 0, which disables the affected timeout path.
Характеристики атаки
Последствия
Строка CVSS v3.1