Executive brief
Phalcon's default HTTP router contains a regular expression with catastrophic backtracking vulnerability that processes every incoming web request. An attacker can send a short, specially crafted URL to cause the router to consume excessive CPU time, exhausting server capacity and degrading service for legitimate users. This can be exploited without authentication and affects all applications using Phalcon's default configuration.
Technical details
The vulnerability is a ReDoS (Regular Expression Denial of Service) caused by a nested quantifier `(/.*)*` in the default route pattern `#^/([\w0-9\_\-]+)/([\w0-9\.\_]+)(/.*)*$#u`. The pattern's group body `(/.*`) overlaps itself because `.` matches `/`, causing exponential backtracking when the regex engine cannot satisfy the anchored `
Affected products
- Phalcon cphalcon <= 5.14.2
Timeline
- 2026-06-29: disclosed
- 2026-08-28: advisory
- 2026-07-10: patched: Version 5.15.0 released with fix
References
- https://api.github.com/users/nikkoenggaliano
- https://github.com/nikkoenggaliano
- https://api.github.com/users/nikkoenggaliano/gists%7B/gist_id%7D
- https://api.github.com/users/nikkoenggaliano/repos
- https://avatars.githubusercontent.com/u/37658579?v=4
- https://api.github.com/users/nikkoenggaliano/events%7B/privacy%7D