CVE-2022-25901 cookiejar Regular Expression Denial of Service via Cookie.parse function

Medium 5.3 Published Updated

An attacker can cause a denial of service in applications using the cookiejar library by triggering a regular expression denial of service via crafted cookies.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-25901?

CVE-2022-25901 is a medium-severity denial of service vulnerability in cookiejar, published on 18 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Versions of the package cookiejar before 2.1.4 are vulnerable to Regular Expression Denial of Service (ReDoS) via the Cookie.parse function, which uses an insecure regular expression.

Weakness: CWE-1333

Which versions are affected by CVE-2022-25901?

4 open source packages ship an affected version, including org.webjars.npm:cookiejar and cookiejar. It affects 1 product.

PackageAffectedFixed in
org.webjars.npm:cookiejar MavenAll versions to 2.1.3None
org.webjars.npm:cookiejar MavenAll versions to 2.1.3None
cookiejar npmAll versions2.1.4
cookiejar npmAll versions2.1.4

Products include Cookiejar Project Cookiejar.

How do I fix CVE-2022-25901?

Upgrade to a fixed version.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-25901 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-25901 exists.

Sources

Also known as DEBIAN-CVE-2022-25901, DLA-3561-1, GHSA-h452-7996-h45h.

Is CVE-2022-25901 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free