Intel

AIKIDO-2024-10063

@fastify/swagger is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Apr 29, 2024

25

Low Risk

This Affects:

JS@fastify/swagger
8.1.0 - 8.12.0
Fixed in 8.12.1
Are you affected? Scan for Free

TL;DR

The affected versions use a regular expression with potentially polynomial worst-case computational complexity, leading to excessive CPU consumption and possibly causing a Denial of Service (DoS). This vulnerability is located in the resolveServerUrls function.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

@fastify/swagger is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 8.1.0 - 8.12.0.

How to fix this

Upgrade the @fastify/swagger library to the patch version.