@fastify/rate-limit vulnerable to failed-login limit bypass via a race condition in the documented flow

State
Published
Severity
5.3 Medium
Published
Nov 21, 2026
Updated
Nov 23, 2026
Reserved
Nov 19, 2026

Read the record on cve.org

Description

@fastify/rate-limit is the rate-limiting plugin for the Fastify web framework. Starting in version 11.1.0, the plugin documented a manual flow for limiting failed login attempts that peeks at the limiter, runs the password check, and consumes a slot only on failure. Because the peek and the consume are two separate store operations with the password check in between, concurrent requests can all pass the peek before any slot is consumed, so in versions 11.1.0 through 11.2.2 a burst of requests runs far more failed attempts than the configured limit, and the sequential path also allowed one attempt more than configured. The default per-request limiter is not affected. The issue is fixed in @fastify/rate-limit 11.3.0, which makes the manual flow atomic by reserving a slot in a single operation and refunding it only on success, and users should upgrade to 11.3.0 or later.

ProductVersions
@fastify/rate-limit @fastify/rate-limit11.1.0 to before 11.3.0 Affected11.3.0 Not Affected

Weaknesses

  • CWE-307 Improper Restriction of Excessive Authentication Attempts
  • CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.