express-rate-limit
A strong pick. 3rd of 10 web security libraries.
express-rate-limit is the standard rate-limiting middleware for Express. It is small and easy to set up, actively maintained, and has plug-in stores for Redis and other backends. It is a strong pick for Express apps. For non-Express servers, or for more complex limiting strategies, rate-limiter-flexible fits better.
Best for: Express (or Connect-style) apps that want per-client request limits with a few lines of config and an optional Redis store.
Scores
Overall7.9
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.5, likely 6.5 to 8.0
For an Express app, this is the default way to add rate limiting. It is simple, active, typed and handles security issues well. It ranks below Helmet and DOMPurify as a category default because it serves only Express. rate-limiter-flexible suits multi-framework or complex distributed limits better.
- github commitsLastYear: 136 commits and 17 releases, very active
- peers rate-limiter-flexible: Closest peer has far fewer dependents but more flexibility
- npm-compare.com/express-brute,express-rate-limit,express-slow-down,rate-limiter-flexible: Simpler, less flexible than rate-limiter-flexible
GPT-6.2 Sol: 8.3, likely 7.2 to 9.2
This is a strong choice for new Express apps that need straightforward request limits. Its typed middleware, clear documentation, active maintenance, and adoption growth support that recommendation. Rate-limiter-flexible is a better fit for apps outside Express or for teams that need a wider choice of built-in storage backends. The need for deployment-specific proxy and store setup keeps the recommendation strongest for conventional Express services.
- github.com/express-rate-limit/express-rate-limit/releases/tag/v8.7.5: Confirms the current stable release.
- express-rate-limit.mintlify.app/reference/configuration: Shows the Express middleware API and its configuration options.
- github.com/animir/node-rate-limiter-flexible: The peer offers framework-independent integration and more built-in storage backends.
- github commitsLastYear, github releasesLastYear, dependents, npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Active maintenance and install growth ahead of the baseline.
Needed by many4.9
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Most public APIs need rate limiting, but this project serves only Express and Connect-style servers. That is a large group, but it is narrower than the whole category, which also covers headers and HTML sanitizing. Express is still the most used Node server framework.
- github description: Basic rate-limiting middleware for the Express web server
- npm-compare.com/express-brute,express-rate-limit,express-slow-down,rate-limiter-flexible: Positioned as Express-specific, compared with framework-agnostic rate-limiter-flexible
GPT-6.2 Sol: 4.8, likely 3.7 to 6.0
Request throttling is a common need for public APIs and login routes, and Express led backend framework usage in the 2025 State of JavaScript survey. This package targets Express-compatible servers and covers one part of web security. The survey leaves open how many teams delegate rate limiting to a gateway or hosting platform.
- 2025.stateofjs.com/en-US/libraries/back-end-frameworks: Express led backend framework usage among respondents.
- github.com/express-rate-limit/express-rate-limit: The package provides request-limiting middleware for Express.
- expressjs.com/en/advanced/best-practice-security: Express recommends throttling repeated login attempts.
Helps a lot7.7
How well does it do the job for those who need it?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It does the common job well: it has clear options, standard RateLimit headers, IPv6 subnet masking, async stores and many config checks that catch mistakes. AI agents write correct code for it easily. Its limits are a fixed-window model and the Express-only design. rate-limiter-flexible is the more capable tool for distributed or complex strategies.
- express-rate-limit.mintlify.app/reference/changelog: v8 added ipv6Subnet, knownOptions validation, async store init, retryAfter option
- dev.to/axiom_agent/nodejs-api-rate-limiting-in-production-from-express-rate-limit-to-redis-backed-distributed-125f: Default memory store breaks across multiple instances; Redis store needed
- npm hasTypes: Ships its own TypeScript types
GPT-6.2 Sol: 8.3, likely 7.2 to 9.2
Version 8.7.5 provides typed fixed-window middleware with async limits, custom client keys, and documented configuration warnings. The small API and worked examples make routine setup straightforward for coding agents, while proxy identity and shared counters still require deployment context. A LibreChat user reported real proxy setup friction, and a benchmark from the makers of hitlimit measured fast in-memory checks with lower throughput than rate-limiter-flexible in its test.
- npm latestVersion, npm hasTypes: Stable version 8.7.5 ships TypeScript declarations.
- express-rate-limit.mintlify.app/reference/configuration: Documents limits, custom keys, headers, and validation.
- express-rate-limit.mintlify.app/reference/stores: Documents which stores share counts across processes and servers.
- github.com/LibreChat-AI/LibreChat/issues/12318: A deployed app reported IP validation warnings behind a reverse proxy.
- hitlimit.jointops.dev/docs/benchmarks: A competing project's microbenchmark measured in-memory throughput.
Holds up over time8.1
Will it still be a good choice in two years?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
The project has been maintained for twelve years. In the last year it had 17 releases and 136 commits, and its issue backlog is tiny. Releases are automated with npm provenance. A small volunteer team carries the work, and the next major release will remove some constants. That is a modest risk, which keeps it from a top score.
- github releasesLastYear / commitsLastYear: 17 releases, 136 commits; latest release 2026-11-18
- github openIssues: 3 open vs 258 closed issues
- github.com/express-rate-limit/express-rate-limit/releases: Steady releases through 2026, published by GitHub Actions
GPT-6.2 Sol: 8.1, likely 6.9 to 9.1
The project logged 136 commits and 17 GitHub releases in the past year, and both named maintainers merged changes in November. The high-severity March fix was backported to three earlier minor lines. The small maintainer team, limited visible sponsorship, and the change to default IPv6 grouping in v8 leave some uncertainty about future support and upgrade effort.
- github commitsLastYear, github releasesLastYear, github openIssues, github openPullRequests: Frequent releases and a small visible backlog.
- github.com/sponsors/express-rate-limit: Names two co-maintainers and lists one current sponsor.
- github.com/express-rate-limit/express-rate-limit/pull/714: One co-maintainer merged a November security fix.
- github.com/express-rate-limit/express-rate-limit/pull/715: The other co-maintainer merged a November API deprecation.
- github.com/express-rate-limit/express-rate-limit/blob/main/docs/reference/changelog.mdx: Records backports, compatibility changes, and the release history.
Used widely6.7
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Downloads rose from 37M to 388M per 4 weeks. That ratio of 10.4 is far above the 4.1 median, but most of the jump comes from the MCP TypeScript SDK, which installs it. Its 27.6k dependent repos are about nine times rate-limiter-flexible's, which points to many direct choices: likely hundreds of thousands of projects.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 388.3M vs 37.3M, ratio about 10.4 against a median of 4.1
- dependents: 27,591 repos and 781 packages; rate-limiter-flexible has 3,010 repos
- licenses.dev/npm/%40modelcontextprotocol%2Fsdk/1.15.1: MCP SDK lists express-rate-limit as a direct dependency, which inflates downloads
GPT-6.2 Sol: 6.4, likely 5.1 to 7.7
Four-week npm downloads climbed from 37.3 million to 388.3 million, about 10.4 times the prior year and well ahead of the 4.1 times catalog median. Ecosyste.ms found 27,591 dependent repositories and 781 packages, well ahead of both rate-limiting peers in the bundle. The MCP SDK and express-slow-down bring indirect installs, and public discussion is sparse, so the download surge gives an imprecise estimate of growth in direct adoption.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Install growth was 10.4 times against a 4.1 times baseline.
- dependents, peers: 27,591 indexed repositories versus 3,010 for rate-limiter-flexible and 2,053 for Upstash.
- github stars, bluesky posts, hackerNews stories: 3,317 stars, three Bluesky links, and no matched Hacker News stories.
- github.com/modelcontextprotocol/typescript-sdk/blob/v1.26.0/src/server/auth/handlers/authorize.ts: The MCP SDK installs and uses the limiter in its OAuth handlers.
- github.com/sponsors/express-rate-limit: The companion express-slow-down package builds on it.
Vouched for6.6
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 4.0 to 7.0
The official MCP TypeScript SDK builds on it, and many tutorials and comparisons treat it as the default for Express. There are no survey results or independent benchmarks for it. Community discussion is thin: no Hacker News stories, and only 3 Bluesky posts.
- huggingface.co/spaces/pgits/mcp-jokes/blob/main/node_modules/%40modelcontextprotocol/sdk/package.json: MCP SDK depends on express-rate-limit
- oneuptime.com/blog/post/2026-03-31-redis-express-rate-limiting/view: 2026 tutorial builds Express rate limiting on it
- hackerNews / bluesky: 0 HN stories, 3 Bluesky posts
GPT-6.2 Sol: 7.2, likely 6.0 to 8.4
The MCP TypeScript SDK uses it for OAuth, n8n declares it directly, and LibreChat users have reported running it in deployed apps. Those are concrete signs of trust in real applications. Evidence specific to the current release is thinner, with limited independent performance coverage and no package-level satisfaction figures in the sources reviewed.
- github.com/modelcontextprotocol/typescript-sdk/blob/v1.26.0/src/server/auth/handlers/authorize.ts: The SDK uses the middleware by default on its authorization endpoint.
- github.com/n8n-io/n8n/blob/master/packages/cli/package.json: n8n directly depends on the older 7.5.0 release.
- github.com/LibreChat-AI/LibreChat/issues/12318: A user reported how the limiter behaved in a deployed LibreChat instance.
- hitlimit.jointops.dev/docs/benchmarks: External performance coverage is limited to a competing project's microbenchmark.
Safe8.0
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It has one advisory, a high-severity issue in March 2026 where IPv4-mapped addresses all shared one limit bucket. It was fixed in 8.3.0 and backported to older minors. Later releases fixed two more security issues before they became advisories. It has 2 dependencies, an MIT licence and publishes with provenance. No Scorecard data is available, which widens the range a little.
- advisories: 1 advisory (GHSA-46wh-pxpv-q5gq, HIGH) in 24 months
- nvd.nist.gov/vuln/detail/CVE-2026-30827: Default keyGenerator put IPv4-mapped addresses into one bucket; fixed in 8.3.0 with backports to 8.0.2, 8.1.1, 8.2.2
- express-rate-limit.mintlify.app/reference/changelog: 8.7.2 and 8.7.5 security fixes; 8.3.1 npm provenance
- npm dependencies: 2 dependencies, MIT licence
GPT-6.2 Sol: 7.9, likely 6.7 to 9.0
The MIT-licensed package has two direct runtime dependencies, and its tagged CI workflow uses npm trusted publishing. The maintainers backported the high-severity March fix and published patches for two additional advisories in October and November that the bundle omitted. All three fixes are in 8.7.5. The unavailable OpenSSF Scorecard and limited visibility into who can trigger a release widen the range.
- npm license, npm dependencies, advisories, scorecard: MIT, two dependencies, one collected advisory, and no Scorecard result.
- github.com/express-rate-limit/express-rate-limit/security/advisories: The project lists three published advisories.
- github.com/express-rate-limit/express-rate-limit/blob/main/docs/reference/changelog.mdx: Documents backports and the October and November fixes.
- github.com/express-rate-limit/express-rate-limit/blob/v8.7.5/.github/workflows/ci.yaml: The tagged workflow publishes to npm using GitHub Actions identity.
Good
- Takes a few lines of config, with clear TypeScript types and runtime checks that catch typos and proxy misconfiguration.
- Very active maintenance: 17 releases and 136 commits in the last year, with only 3 open issues.
- Separate store packages such as rate-limit-redis make limits shared across instances.
- Security fixes ship fast and get backported to older 8.x minors.
Bad
- Tied to Express-style middleware, so it does not fit Fastify, Hono or edge runtimes well.
- Has fewer algorithms and knobs than rate-limiter-flexible, for example no built-in sliding window or login brute-force patterns.
- The default in-memory store gives wrong totals when more than one process runs, unless you add an external store.
- Most of its recent download growth comes from the MCP TypeScript SDK installing it, not from developers choosing it.
The numbers
- npm downloads, 4 weeks
- 388M ×10 in a year
- GitHub stars
- 3.3k
- Commits, 12 months
- 136
- npm version
- 8.7.5 Nov 2026
- Versions, 12 months
- 20
- Advisories, 24 months
- 1 of 1 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (express-rate-limit/express-rate-limit), npm (express-rate-limit), OSV and the OpenSSF Scorecard.
Web security libraries
- 8.7DOMPurify
- 8.2Helmet
- 7.9express-rate-limit
- 7.6cors
- 7.4rate-limiter-flexible
- 7.0Upstash Ratelimit
- 6.8sanitize-html
- 6.1csrf-csrf
- 5.7Arcjet
- 5.0js-xss