# CVE-2022-25881: http-cache-semantics vulnerable to Regular Expression Denial of Service

> A malicious request header can cause excessive CPU consumption in the http-cache-semantics library, leading to denial of service.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Jan 2023
- **Updated:** 27 Mar 2025
- **Also known as:** AZL-13173, AZL-43768, AZL-44958, CLEANSTART-2026-IK83988, CLEANSTART-2026-OX04793, GHSA-rc47-6667-2j5j, MINI-gpf6-jjpc-gxw6, ROOT-APP-NPM-CVE-2022-25881, SUSE-SU-2023:1871-1, SUSE-SU-2023:1872-1, SUSE-SU-2023:1875-1, SUSE-SU-2023:1876-1, SUSE-SU-2023:1923-1, SUSE-SU-2023:1924-1, SUSE-SU-2023:1942-1, openSUSE-SU-2024:12870-1

## What is CVE-2022-25881?

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

### Official description

This affects versions of the package http-cache-semantics before 4.1.1. The issue can be exploited via malicious request header values sent to a server, when that server reads the cache policy from the request using this library.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2022-25881?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.webjars.npm:http-cache-semantics` | Maven | All versions | 4.1.1 |
| `org.webjars.npm:http-cache-semantics` | Maven | All versions | 4.1.1 |
| `http-cache-semantics` | npm | All versions | 4.1.1 |
| `http-cache-semantics` | npm | All versions | 4.1.1 |
| `nodejs10` | SUSE:Enterprise Storage 7 | All versions | 10.24.1-150000.1.59.1 |
| `nodejs12` | SUSE:Enterprise Storage 7 | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Enterprise Storage 7 | All versions | 14.21.3-150200.15.46.1 |
| `nodejs12` | SUSE:Enterprise Storage 7.1 | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Enterprise Storage 7.1 | All versions | 14.21.3-150200.15.46.1 |
| `nodejs16` | SUSE:Enterprise Storage 7.1 | All versions | 16.20.0-150300.7.21.2 |
| `nodejs10` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 10.24.1-150000.1.59.1 |
| `nodejs10` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 10.24.1-150000.1.59.1 |
| `nodejs12` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 14.21.3-150200.15.46.1 |
| `nodejs12` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 14.21.3-150200.15.46.1 |
| `nodejs16` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 16.20.0-150300.7.21.2 |
| `nodejs12` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 14.21.3-150200.15.46.1 |
| `nodejs16` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 16.20.0-150300.7.21.2 |
| `nodejs14` | SUSE:Linux Enterprise Module for Web and Scripting 12 | All versions | 14.21.3-6.43.1 |
| `nodejs16` | SUSE:Linux Enterprise Module for Web and Scripting 12 | All versions | 16.20.0-8.27.1 |
| `nodejs16` | SUSE:Linux Enterprise Module for Web and Scripting 15 SP4 | All versions | 16.20.0-150400.3.18.2 |
| `nodejs10` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 10.24.1-150000.1.59.1 |
| `nodejs10` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 10.24.1-150000.1.59.1 |
| `nodejs12` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 14.21.3-150200.15.46.1 |
| `nodejs12` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 14.21.3-150200.15.46.1 |
| `nodejs16` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 16.20.0-150300.7.21.2 |
| `nodejs10` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 10.24.1-150000.1.59.1 |
| `nodejs10` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 10.24.1-150000.1.59.1 |
| `nodejs12` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 14.21.3-150200.15.46.1 |
| `nodejs12` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 14.21.3-150200.15.46.1 |
| `nodejs16` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 16.20.0-150300.7.21.2 |
| `nodejs12` | SUSE:Manager Server 4.2 | All versions | 12.22.12-150200.4.47.1 |
| `nodejs14` | SUSE:Manager Server 4.2 | All versions | 14.21.3-150200.15.46.1 |
| `nodejs16` | SUSE:Manager Server 4.2 | All versions | 16.20.0-150300.7.21.2 |

Products: Http-Cache-Semantics Project Http-Cache-Semantics.

## How do I fix CVE-2022-25881?

Upgrade org.webjars.npm:http-cache-semantics to 4.1.1 or later.

## Is CVE-2022-25881 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-25881 and fix it if it is affected.

What it is: CVE-2022-25881 is a medium-severity denial of service vulnerability in http-cache-semantics, published on 31 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-25881 exists.

Affected packages and fixed versions:
- org.webjars.npm:http-cache-semantics (Maven): affected all versions; fixed in 4.1.1
- org.webjars.npm:http-cache-semantics (Maven): affected all versions; fixed in 4.1.1
- http-cache-semantics (npm): affected all versions; fixed in 4.1.1
- http-cache-semantics (npm): affected all versions; fixed in 4.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-25881/ (Markdown: https://insights.sbomify.com/CVE-2022-25881/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-25881
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-25881
- OSV: https://osv.dev/vulnerability/CVE-2022-25881

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-25881/
Summaries are generated and may contain mistakes; the official description above is the record.
