Sharp is Vulnerable to Path Traversal via Unsanitized Extension in FileUtil
Published Mar 26, 2026
8.8
HIGHCVSS 3.1
EPSS 0.57%
Description
Sharp is a content management framework built for Laravel as a package. Versions prior to 9.20.0 have a path traversal vulnerability in the FileUtil class. The application fails to sanitize file extensions properly, allowing path separators to be passed into the storage layer. In `src/Utils/FileUtil.php`, the `FileUtil::explodeExtension()` function extracts a file's extension by splitting the filename at the last dot. This issue has been patched in version 9.20.0 by properly sanitizing the extension using `pathinfo(PATHINFO_EXTENSION)` instead of `strrpos()`, alongside applying strict regex replacements to both the base name and the extension.
Affected products
-
- Version < 9.20.0StatusaffectedConstraints-
- Version
No data.
No Red Hat product state for this CVE.
No package ranges for this CVE.
Remediation
No remediation recorded yet.
References (5)
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-16446 Advisory
- https://github.com/advisories/GHSA-9ffq-6457-8958 Advisory
- https://github.com/code16/sharp/pull/715 x_refsource_MISCIssue TrackingPatch
- https://github.com/code16/sharp/security/advisories/GHSA-9ffq-6457-8958 x_refsource_CONFIRMVendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-33686
| Link | Providers | Tags |
|---|---|---|
| https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-16446 | Advisory | |
| https://github.com/advisories/GHSA-9ffq-6457-8958 | Advisory | |
| https://github.com/code16/sharp/pull/715 | x_refsource_MISCIssue TrackingPatch | |
| https://github.com/code16/sharp/security/advisories/GHSA-9ffq-6457-8958 | x_refsource_CONFIRMVendor Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-33686 |
Change history (0)
No recorded changes yet.