Skip to main content
← All vulnerabilities
CVE-2025-25200GHSA-593F-38F6-JP5M

Koa has Inefficient Regular Expression Complexity

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.21.2, 1.7.1, 2.15.4, 3.0.0-alpha.3
2 proofs of concept on GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

Koa is expressive middleware for Node.js using ES2017 async functions. Prior to versions 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3, Koa uses an evil regex to parse the `X-Forwarded-Proto` and `X-Forwarded-Host` HTTP headers. This can be exploited to carry out a Denial-of-Service attack. Versions 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3 fix the issue.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • koajs koa

    fixed in 0.21.2; From 1.0.0 · fixed in 1.7.1; From 2.0.0-alpha.1 · fixed in 2.15.4

  • koanpm

    From 2.0.0 · fixed in 2.15.4

  • koanpm

    From 3.0.0-alpha.0 · fixed in 3.0.0-alpha.3

  • koanpm

    From 1.0.0 · fixed in 1.7.1

  • koanpm

    fixed in 0.21.2

References 9

GitHub · koajs/koa

GitHub · dwictor0/PoC-CVE-2025-25200

GitHub · gduma-phData/patch-CVE-2025-25200