CVE-2025-25200
Koajs Koa ≤ 0.21.2
Raw 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:XCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2025-25200 is a critical-severity Inefficient Regular Expression Complexity (CWE-1333) vulnerability in Koajs Koa. Its CVSS base score is 9.2 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Endpoint Denial of Service (T1499); ranked in the top 43% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-15 (Development Process, Standards, and Tools) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2025-25200 is a denial-of-service vulnerability in Koa, an expressive middleware framework for Node.js that uses ES2017 async functions. The issue affects Koa versions prior to 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3, stemming from an inefficient regular expression (CWE-1333) used to parse the X-Forwarded-Proto and X-Forwarded-Host HTTP headers. This "evil regex" enables a ReDoS attack, consuming excessive CPU resources. The vulnerability carries a CVSS v3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) and was published on 2025-02-12.
Any unauthenticated remote attacker can exploit this vulnerability by sending specially crafted HTTP requests containing malicious payloads in the X-Forwarded-Proto or X-Forwarded-Host headers. The low attack complexity and lack of required privileges or user interaction make it highly accessible over the network. Successful exploitation results in significant resource exhaustion, leading to denial of service on the affected Koa application.
Mitigation requires upgrading to Koa versions 0.21.2, 1.7.1, 2.15.4, or 3.0.0-alpha.3, which address the issue via commits documented in the project's GitHub repository, including changes to the regex parsing logic in lib/request.js at lines 259 and 404. Relevant patches are available at https://github.com/koajs/koa/commit/5054af6e31ffd451a4151a1fe144cef6e5d0d83c, https://github.com/koajs/koa/commit/5f294bb1c7c8d9c61904378d250439a321bffd32, and https://github.com/koajs/koa/commit/93fe903fc966635a991bcf890cfc3427d33a1a08.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2025-4086
Vulnerability Data
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…
more
attack. Versions 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3 fix the issue.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5) AI
Developer testing and evaluation can discover inefficient regex patterns via performance or static analysis.
Development standards and tools can require safe regex construction and forbid known exponential patterns.
Denial-of-service protections limit resource exhaustion caused by expensive regex evaluation.
Input validation can constrain data that would otherwise trigger worst-case regex complexity.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Security testing can detect and reject regex patterns with exponential worst-case complexity.
Secure coding standards explicitly prohibit or limit the use of inefficient regular expressions.