| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| getkirby/cms | composer | < 3.9.8.3 | 3.9.8.3 |
| getkirby/cms | composer | >= 3.10.0, < 3.10.1.2 | 3.10.1.2 |
| getkirby/cms | composer | >= 4.0.0, < 4.7.1 | 4.7.1 |
The vulnerability is a path traversal issue within the router.php script provided by Kirby for use with PHP's built-in web server. The provided commit 3ebc9ad3f5adcbd4838ce60219f1c9a561231235 directly patches this file. The diff shows that the logic for checking if a requested URI corresponds to a static file was modified. Specifically, the original code used file_exists() with a path constructed from user input ($uri, derived from $_SERVER['REQUEST_URI']) without ensuring that this path resolved to a location within the document root. This allowed path traversal. The patch introduces checks using realpath() and substr() to validate that the file path is confined to the document root. Since the vulnerable logic is in the global execution scope of the router.php script and not within a specific user-defined function shown in the patch, the script router.php itself is identified as the vulnerable component. A runtime profiler would indicate execution within this script when the vulnerability is triggered.
Ongoing coverage of React2Shell