Advisory

GHSA-593f-38f6-jp5m

Also known as: CVE-2025-25200

Summary

Inefficient Regular Expression Complexity in koa

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2025-02-12 19:23 UTC
Modified
2025-02-12 19:27 UTC

Affected packages and fixes

koa

npm · All systems

Affected

  • introduced 2.0.0, fixed 2.15.4 (semver)

Fixed versions

2.15.4

Fix

koa

npm · All systems

Affected

  • introduced 3.0.0-alpha.0, fixed 3.0.0-alpha.3 (semver)

Fixed versions

3.0.0-alpha.3

Fix

koa

npm · All systems

Affected

  • introduced 1.0.0, fixed 1.7.1 (semver)

Fixed versions

1.7.1

Fix

koa

npm · All systems

Affected

  • introduced 0, fixed 0.21.2 (semver)

Fixed versions

0.21.2

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences