---
title: "GHSA-rc47-6667-2j5j: http-cache-semantics vulnerable to Regular Expression Denial of Service"
description: "High severity. http-cache-semantics vulnerable to Regular Expression Denial of Service. Affects http-cache-semantics; fixed in 4.1.1."
url: https://inlinr.com/advisories/GHSA-rc47-6667-2j5j
lang: en
---

[Packages](https://inlinr.com/packages) / [http-cache-semantics](https://inlinr.com/packages/http-cache-semantics) / [Security](https://inlinr.com/packages/http-cache-semantics/security)

High Vulnerability GHSA-rc47-6667-2j5j CVE-2022-25881 Published 31 Jan 2023

# http-cache-semantics vulnerable to Regular Expression Denial of Service

Your version 

Affected releases · [http-cache-semantics](https://inlinr.com/packages/http-cache-semantics)

- 4.x 4.0.0 – 4.1.0 Fixed in 4.1.1
- 3.x and older 1.0.0 – 3.8.1 No fix, no longer updated

On 4.x, the newest line:

```
npm install http-cache-semantics@4.1.1
```

Every release on a timeline

4.x 

1. Affected

4.0.0 – 4.1.0  
6 releases
2. Fixed

4.1.1 – 4.3.0  
3 releases, latest

3.x 

1. Affected

3.0.0 – 3.8.1  
17 releases

2.x 

1. Affected

2.0.0  
1 release

1.x 

1. Affected

1.0.0  
1 release

28 stable releases of http-cache-semantics, oldest to newest, one row per major.

## What happens

http-cache semantics contains an Inefficient Regular Expression Complexity , leading to Denial of Service. 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.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: none
- **Availability**: high

CVSS:3.1/​AV:N/​AC:L/​PR:N/​UI:N/​S:U/​C:N/​I:N/​A:H

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-25881 "https://nvd.nist.gov/vuln/detail/CVE-2022-25881")  
nvd.nist.gov/vuln/detail/CVE-2022-25881
- [Fix commit](https://github.com/kornelski/http-cache-semantics/commit/560b2d8ef452bbba20ffed69dc155d63ac757b74 "https://github.com/kornelski/http-cache-semantics/commit/560b2d8ef452bbba20ffed69dc155d63ac757b74")  
560b2d8
- [Package](https://github.com/kornelski/http-cache-semantics "https://github.com/kornelski/http-cache-semantics")  
github.com/kornelski/http-cache-semantics
- [Reference](https://github.com/kornelski/http-cache-semantics/blob/master/index.js%23L83 "https://github.com/kornelski/http-cache-semantics/blob/master/index.js%23L83")  
github.com/kornelski/http-cache-semantics/blob/…
- [Reference](https://security.netapp.com/advisory/ntap-20230622-0008 "https://security.netapp.com/advisory/ntap-20230622-0008")  
security.netapp.com/advisory/ntap-20230622-0008
- [Reference](https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3253332 "https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3253332")  
security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3…
- [Reference](https://security.snyk.io/vuln/SNYK-JS-HTTPCACHESEMANTICS-3248783 "https://security.snyk.io/vuln/SNYK-JS-HTTPCACHESEMANTICS-3248783")  
security.snyk.io/vuln/SNYK-JS-HTTPCACHESEMANTIC…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
