| Gói / sản phẩm | Phiên bản bị ảnh hưởng | Phiên bản đã vá |
|---|---|---|
| craftcms/cms | ≥ 4.0.0-RC1, < 4.17.7≥ 5.0.0-RC1, < 5.9.13 | 4.17.75.9.13 |
An authenticated path traversal in assets/icon allows local SVG file read by passing traversal sequences in the extension parameter. The issue is caused by file existence checks happening before extension validation.
The endpoint:
src/controllers/AssetsController.php:1115-1123actionIcon(string $extension) calls Assets::iconPath($extension) and returns sendFile($path, ...).In Assets::iconPath():
extension:
src/helpers/Assets.php:906-909file_exists($path) is true, path is returned immediately:
src/helpers/Assets.php:910-912Validation exists in Assets::iconSvg():
preg_match('/^\w+$/', $extension)src/helpers/Assets.php:927-931However, that validation is only reached if iconPath() does not find a file.
So traversal payloads that resolve to existing .svg files bypass validation and are served by sendFile().
Bạn đang dùng một trong các sản phẩm này? Quét site để biết có đang lộ phiên bản có lỗ hổng không.
Quét site miễn phí