CVE-2017-16115: Timespan Denial of Service Vulnerability
HIGHCVE-2017-16115 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Timespan libraries in the npm ecosystem. The issue involves regular expression denial of service in timespan. Remediation is available in the latest vendor maintenance releases.
CVE-2017-16115 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.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2017-16115
To remediate this vulnerability, upgrade all affected Timespan 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 timespan@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls timespan
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-16115, inspect your project dependencies using npm:
npm ls timespan
Analyze the terminal output to locate any version of Timespan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls timespan 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Timespan, 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-2017-16115 Affected Timespan Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
timespan
|
npm |
≤ 2.3.0
|
|
References
Frequently Asked Questions
What is CVE-2017-16115?
Which Timespan versions are affected?
What version fixes CVE-2017-16115?
Is timespan affected?
What is the CVSS score of CVE-2017-16115?
What CWE is associated with CVE-2017-16115?
How can I check npm dependencies for CVE-2017-16115?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f523-2f5j-gfcg",
"modified" : "2023-09-13T19:38:19Z",
"published" : "2018-08-29T23:04:14Z",
"aliases" : [ "CVE-2017-16115" ],
"summary" : "Regular Expression Denial of Service in timespan",
"details" : "Affected versions of `timespan` are vulnerable to a regular expression denial of service when parsing dates.\n\nThe amplification for this vulnerability is significant, with 50,000 characters resulting in the event loop being blocked for around 10 seconds.\n\n\n## Recommendation\n\nNo direct patch is available for this vulnerability.\n\nCurrently, the best available solution is to use a functionally equivalent alternative package.\n\nIt is also sufficient to ensure that user input is not being passed into `timespan`, or that the maximum length of such user input is drastically reduced. Limiting the input length to 150 characters should be sufficient in most cases.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "timespan"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16115"
}, {
"type" : "WEB",
"url" : "https://github.com/indexzero/TimeSpan.js/issues/10"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-f523-2f5j-gfcg"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/533"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:33:38Z",
"nvd_published_at" : null
}
}