NetSight
critical9.2

CVE-2025-25200

Inefficient Regular Expression Complexity in koa

Impact

### Summary 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. ### PoC Coming soon. ### Impact This is a Regex Denial-of-Service attack and causes memory exhaustion. The regex should be improved and empty values should not be allowed.

Affected packages

EcosystemPackageAffectedFixed in
npmkoa>= 2.0.0, < 2.15.42.15.4

Affected products

VendorProductAffected versions
KoajsKoa
before 0.21.2
from 1.0.0 before 1.7.1
from 2.0.0 before 2.15.4
Version 3.0.0

Weakness classification

References