All reports
Critical

Inefficient Regular Expression Complexity in koa

Affected versions

npmkoa
Affected versions
>= 2.0.0, < 2.15.4
Fixed version
2.15.4
npmkoa
Affected versions
>= 3.0.0-alpha.0, < 3.0.0-alpha.3
Fixed version
3.0.0-alpha.3
npmkoa
Affected versions
< 0.21.2
Fixed version
0.21.2
npmkoa
Affected versions
>= 1.0.0, < 1.7.1
Fixed version
1.7.1

Exploitation

CVE-2025-25200

Probability of exploitation in the next 30 days: 0.88%

FIRST EPSS · 2026-11-22

Description

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.

Links

Credits

  • R4356th