Security Resilience

CVE-2025-25200

Koajs Koa ≤ 0.21.2

Published
12 February 2025
Modified
20 January 2026
Patch / advisory
CVSS Score v4 9.2
Click a component to see what it means
Raw vectorCVSS: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
EPSS Score 0.0084 57th percentile
Risk Priority 47 floored blend · peak EPSS

CVSS 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

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

T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
T1499.003 Application Exhaustion Flood Impact
Adversaries may target resource intensive features of applications to cause a denial of service (DoS), denying availability to those applications.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-8129Same product: Koajs Koa
CVE-2025-62595Same product: Koajs Koa
CVE-2025-32379Same product: Koajs Koa
CVE-2026-27959Same product: Koajs Koa
CVE-2025-27220Shared CWE-1333
CVE-2026-58578Shared CWE-1333
CVE-2026-28356Shared CWE-1333
CVE-2026-45305Shared CWE-1333
CVE-2026-35458Shared CWE-1333
CVE-2026-79770Shared CWE-1333

Affected Assets

koajs
koa
3.0.0 · ≤ 0.21.2 · 1.0.0 — 1.7.1 · 2.0.0 — 2.15.4

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.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly prevent inefficient regex via reviews, static analysis, and safe libraries.

ID.RA-01 partial match
blocks

Vulnerability identification processes can discover ReDoS issues in existing code but do not stop their introduction.

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.

finds

Security testing can detect and reject regex patterns with exponential worst-case complexity.

prevents

Secure coding standards explicitly prohibit or limit the use of inefficient regular expressions.

References