Vulnerabilities in pkg:npm/semver
PACKAGECVE-2015-8855 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Semver libraries in the npm ecosystem. The issue involves regular expression denial of service in semver. Remediation is available by upgrading affected packages to version 4.3.2.
pkg:npm/semver
Vulnerability advisories affecting package pkg:npm/semver. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-x6fg-f45m-jf5q | CVE-2015-8855 | HIGH | Regular Expression Denial of Service in semver |
| GHSA-c2qf-rxjj-qqgw | CVE-2022-25883 | HIGH | semver vulnerable to Regular Expression Denial of Service |
CVE-2015-8855 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2015-8855
To remediate this vulnerability, upgrade all affected Semver dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install semver@4.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls semver
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2015-8855, inspect your project dependencies using npm:
npm ls semver
Analyze the terminal output to locate any version of Semver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.3.2), your application is affected.
Note: The npm ls semver command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Semver, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2015-8855 Affected Semver Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
semver
|
npm |
≥ 1.0.4
< 4.3.2
|
4.3.2
|
References
Frequently Asked Questions
What is CVE-2015-8855?
Which Semver versions are affected?
What version fixes CVE-2015-8855?
Is semver affected?
What is the CVSS score of CVE-2015-8855?
What CWE is associated with CVE-2015-8855?
How can I check npm dependencies for CVE-2015-8855?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x6fg-f45m-jf5q",
"modified" : "2026-03-03T20:03:27Z",
"published" : "2017-10-24T18:33:36Z",
"aliases" : [ "CVE-2015-8855" ],
"summary" : "Regular Expression Denial of Service in semver",
"details" : "Versions 4.3.1 and earlier of `semver` are affected by a regular expression denial of service vulnerability when extremely long version strings are parsed.\n\n\n\n## Recommendation\n\nUpdate to version 4.3.2 or later",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "semver"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.4"
}, {
"fixed" : "4.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-8855"
}, {
"type" : "WEB",
"url" : "https://github.com/github/advisory-database/pull/7102"
}, {
"type" : "WEB",
"url" : "https://github.com/npm/node-semver/commit/5c4c9f6e26c7052a42b5ced2a7481c5c9b4363a0"
}, {
"type" : "WEB",
"url" : "https://github.com/npm/node-semver/commit/c80180d8341a8ada0236815c29a2be59864afd70"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-x6fg-f45m-jf5q"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/npm/node-semver"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/31"
}, {
"type" : "WEB",
"url" : "https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2016/04/20/11"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/86957"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T22:02:25Z",
"nvd_published_at" : "2017-01-23T21:59:00Z"
}
}