Improper Enforcement of Behavioral Workflow Affecting express-rate-limit package, versions <8.7.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.28% (21st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Enforcement of Behavioral Workflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-EXPRESSRATELIMIT-22552228
  • published15 Nov 2026
  • disclosed12 Nov 2026
  • creditmonotykamary

Introduced: 12 Nov 2026

NewCVE-2026-126204  (opens in a new tab)
CWE-841  (opens in a new tab)

How to fix?

Upgrade express-rate-limit to version 8.7.2 or higher.

Overview

express-rate-limit is a Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.

Affected versions of this package are vulnerable to Improper Enforcement of Behavioral Workflow via MemoryStore.resetClient mutating the shared resetTime Date object in place when skipFailedRequests or skipSuccessfulRequests is enabled. MemoryStore.increment returns the stored Client object directly, so the middleware's resetTime reference and the store's client.resetTime point to the same Date. When a subsequent request triggers resetClient, it calls client.resetTime.setTime(now + windowMs), advancing that shared Date forward. An earlier request still in flight then finishes or disconnects after the window boundary, reads the now-updated reset time, passes the stale-window guard at rate-limit.ts:545-547, and decrements the new window's hit count. A client that keeps requests in flight across a window boundary can thereby obtain up to one additional configured limit worth of requests in the new window as a one-off burst.

Note: This is only exploitable when the default MemoryStore is used together with the skipFailedRequests or skipSuccessfulRequests option.

CVSS Base Scores

version 4.0
version 3.1