GHSA-c43v-4cr8-6mvp — craftcms/cms
Fix: craftcms/cms@30f5f1aGHSA-c43v-4cr8-6mvp is a Path Traversal vulnerability in craftcms/cms. A fix is available for craftcms/cms — see the affected versions and patch details below.
Craft CMS has authenticated path traversal in `assets/icon`, allowing local `.svg` file read
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-c43v-4cr8-6mvp.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
craftcms/cms🐘craftcms/cmsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Summary
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.
Details
The endpoint:
src/controllers/AssetsController.php:1115-1123actionIcon(string $extension)callsAssets::iconPath($extension)and returnssendFile($path, ...).
In Assets::iconPath():
- Path is built from user-controlled
extension:src/helpers/Assets.php:906-909
- If
file_exists($path)is true, path is returned immediately:src/helpers/Assets.php:910-912
Validation exists in Assets::iconSvg():
preg_match('/^\w+$/', $extension)src/helpers/Assets.php:927-931
However, 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().
Impact
- Authenticated users can read local .svg files accessible to the application process.
References
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | craftcms/cms | ≥ 4.0.0-RC1&&< 4.17.7 | 4.17.7composer require craftcms/cms:^4.17.7 |
| 🐘Packagist | craftcms/cms | ≥ 5.0.0-RC1&&< 5.9.13 | 5.9.13composer require craftcms/cms:^5.9.13 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for craftcms/cms, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update craftcms/cms to 4.17.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-c43v-4cr8-6mvp is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is GHSA-c43v-4cr8-6mvp in your dependencies?
Find it across Packagist, including transitive dependencies.