VDB
Sign up
HIGH7.5

GHSA-g7q5-pjjr-gqvp

Regular Expression Denial of Service in tough-cookie

Quick fix

GHSA-g7q5-pjjr-gqvp — tough-cookie: upgrade to the fixed version with the command below.

npm install tough-cookie@2.3.3

Details

Affected versions of `tough-cookie` are susceptible to a regular expression denial of service.

The amplification on this vulnerability is relatively low - it takes around 2 seconds for the engine to execute on a malicious input which is 50,000 characters in length.

If node was compiled using the `-DHTTP_MAX_HEADER_SIZE` however, the impact of the vulnerability can be significant, as the primary limitation for the vulnerability is the default max HTTP header length in node.

## Recommendation

Update to version 2.3.3 or later.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/tough-cookie
Introduced in: 0Fixed in: 2.3.3
Fixnpm install tough-cookie@2.3.3

References