Skip to content
Medium

Route-level rate limits are bypassed wholesale via path case variations (koa-router case-insensitive matching vs raw-path limiter keying)

GHSA-5r93-89wq-vx52 First seen on SecPulse

Summary

Summary

Outline's rate limiting is split into two phases: route middleware only registers a limiter for ${ctx.mountPath}${ctx.path}, and a global middleware consumes it under a key built from the same raw path string. koa-router matches routes case-insensitively by default, so every c...

Affected packages

PackageAffected → Fixed
otherOutline
< 1.10.0→ 1.10.0
Original description The description as published by the source.

Summary

Outline's rate limiting is split into two phases: route middleware only registers a limiter for ${ctx.mountPath}${ctx.path}, and a global middleware consumes it under a key built from the same raw path string. koa-router matches routes case-insensitively by default, so every casing/trailing-slash variant of a route hits the same handler but gets its own rate-limit bucket in Redis. For /auth/email (10 OTP emails/hour/IP) the path email alone yields 32 casings × optional trailing slash = 64 buckets (~640 emails/hour); for /auth/email.callback (5 verifications/minute) the 13-letter path yields 8192 variants, so the verification endpoint stops being a bottleneck. Combined with the OTP being 6 digits, full-space brute force drops from years to days. The same bypass applies to every route-level-limited endpoint (/oauth/token, oauthClients.create, …). This neutralizes the assumptions behind the CVE-2026-33640 remediation.

Affected Versions

Verified on main @ c74fd2e64 (post v1.9.1, 2026-08-13), RATE_LIMITER_ENABLED=true (default).

Details

  • Registration: server/middlewares/rateLimiter.ts:130 — fullPath = ${ctx.mountPath ?? ""}${ctx.path}, raw casing preserved.
  • Consumption: rateLimiter.ts:68,76 — bucket key ${fullPath}:${identifier} with the same raw string.
  • koa-router 7.4.0 defaults to sensitive: false — verified: POST /auth/EMAIL and POST /auth/email.CALLBACK reach the same handlers.
  • OTP side: `server/utils/Verif…

Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details