CRITICAL🇵🇱 Wersja polska

CVE-2025-25200

CVSS 9.2v4.0pub. 2025-02-12upd. 2026-01-20

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.

🤖 AI Analysis
How it works

The vulnerability concerns parsing HTTP headers `X-Forwarded-Proto` and `X-Forwarded-Host` using an 'evil regex' — a regular expression vulnerable to catastrophic backtracking. An attacker can send a specially crafted HTTP request containing an appropriately constructed value of these headers. Processing such a request causes exponential lengthening of the execution time of the regular expression, leading to blocking of the Node.js thread and unavailability of the application.

Impact

An unauthenticated attacker can cause a denial of service (DoS) both in the context of the application itself and the system on which it runs, effectively preventing the handling of legitimate requests.

Mitigation & patch

Koa should be updated to version 0.21.2, 1.7.1, 2.15.4, or 3.0.0-alpha.3 (depending on the branch used), in which the issue has been fixed. Additionally, consider filtering or validating `X-Forwarded-Proto` and `X-Forwarded-Host` headers at the reverse proxy or firewall level before passing them to the application.

Who is affected

Koa (koajs/koa) in versions prior to 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Koajs Koa

    APP
    Koajs
    3.0.0< 0.21.21.0.0 – 1.7.1 (excl.)2.0.0 – 2.15.4 (excl.)
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
CWE
References

Related vulnerabilities

CVE-2026-27959HIGH7.5same product

Koa is middleware for Node.js using ES2017 async functions. Prior to versions 3.1.2 and 2.16.4, Koa's `ctx.hos...

CVE-2025-62595MEDIUM4.3same product

Koa is expressive middleware for Node.js using ES2017 async functions. In versions 2.16.2 to before 2.16.3 and...

CVE-2025-32379MEDIUM5.0same product

Koa is expressive middleware for Node.js using ES2017 async functions. In koa < 2.16.1 and < 3.0.0-alpha.5, pa...

CVE-2025-8129LOW2.0same product

Podatliwość w KoaJS Koa do wersji 3.0.0 została klasyfikowana jako problematyczna. Dotyczy funkcji back w plik...

CVE-2023-49803HIGH8.6same vendor

@koa/cors npm provides Cross-Origin Resource Sharing (CORS) for koa, a web framework for Node.js. Prior to ver...