CVE-2017-16119: Regular Expression Denial of Service in fresh

fresh Updated 02 Oct 2025

Summary

24/07/2018
Yes i
High
7.5

CVE-2017-16119: Regular Expression Denial of Service in fresh. Affects fresh versions < 0.5.2. Fixed in 0.5.2. How to fix ↓

Also tracked for

The same CVE-2017-16119 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The fresh package is an npm package used for parsing and comparing HTTP request headers. It is commonly used in web applications to determine if a resource is fresh or stale based on the request headers. The package provides functionality to parse and compare the If-None-Match and If-Modified-Since headers. However, versions of fresh prior to 0.5.2 are vulnerable to regular expression denial of service (ReDoS) attacks when parsing specially crafted user input.

Vulnerability Detail

The vulnerability in fresh arises from the way it handles user input. An attacker can exploit this vulnerability by sending specially crafted input that triggers a ReDoS attack. This can lead to a denial of service condition where the application becomes unresponsive or consumes excessive CPU resources. The vulnerability is rated as HIGH severity and has been assigned the Common Weakness Enumeration (CWE) ID CWE-400.

How To Fix

Minimum fixed version

0.5.2

This is the first release that contains the fix.

npm install fresh@0.5.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The fresh package prior to version 0.5.2 is vulnerable to regular expression denial of service attacks. To protect your application, it is recommended to update to version 0.5.2 or later. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for fresh →

Share this vulnerability

FAQ

The vulnerability can lead to a denial of service condition where the application becomes unresponsive or consumes excessive CPU resources.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your package-lock.json file and the playground will analyze it for vulnerabilities in real-time.

No, only versions prior to 0.5.2 are affected. It is recommended to update to version 0.5.2 or later to fix the vulnerability.

No, the recommended solution is to update to the latest version of the fresh package.

There are no known public exploits for this vulnerability at the moment.

How To Fix

Minimum fixed version

0.5.2

This is the first release that contains the fix.

npm install fresh@0.5.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.