GHSA-593f-38f6-jp5mCritical

Inefficient Regular Expression Complexity in koa

Published
February 12, 2025
Last Modified
February 12, 2025

🔗 CVE IDs covered (1)

📋 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.

🎯 Affected products4

  • npm/koa:>= 2.0.0, < 2.15.4
  • npm/koa:>= 3.0.0-alpha.0, < 3.0.0-alpha.3
  • npm/koa:>= 1.0.0, < 1.7.1
  • npm/koa:< 0.21.2

🔗 References (7)