Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. http-cache-semantics
  4. ›
  5. CVE-2022-25881

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

January 31, 2023 (updated February 13, 2025)

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.

References

  • github.com/advisories/GHSA-rc47-6667-2j5j
  • github.com/kornelski/http-cache-semantics
  • github.com/kornelski/http-cache-semantics/blob/master/index.js%23L83
  • github.com/kornelski/http-cache-semantics/commit/560b2d8ef452bbba20ffed69dc155d63ac757b74
  • nvd.nist.gov/vuln/detail/CVE-2022-25881
  • security.netapp.com/advisory/ntap-20230622-0008
  • security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3253332
  • security.snyk.io/vuln/SNYK-JS-HTTPCACHESEMANTICS-3248783

Code Behaviors & Features

Detect and mitigate CVE-2022-25881 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 4.1.1

Fixed versions

  • 4.1.1

Solution

Upgrade to version 4.1.1 or above.

Impact 5.3 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

npm/http-cache-semantics/CVE-2022-25881.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:44 +0000.