Sharp is Vulnerable to Path Traversal via Unsanitized Extension in FileUtil
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| code16 | sharp | before 9.20.0 | 9.20.0 | Patch available | CNA |
| — | code16/sharp (Packagist) | before 9.20.0 | 9.20.0 | Patch available | GHSA-9ffq-6457-8958 |
- sharp Vendorcode16 Affected before 9.20.0 Fixed in 9.20.0 Patch available CNA
- code16/sharp (Packagist) Vendor— Affected before 9.20.0 Fixed in 9.20.0 Patch available GHSA-9ffq-6457-8958
Remediation
- Fix · CNA sharp (code16) Fixed in 9.20.0
- Fix · GHSA-9ffq-6457-8958 code16/sharp (Packagist) Fixed in 9.20.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-33686
- 2026-10-03 Alias added: GHSA-9ffq-6457-8958
References
More code16 Sharp vulnerabilities
- TI-2026-26067 Sharp has Unrestricted File Upload via Client-Controlled Validation Rules CVSS 3.1HIGH 8.8
Sources
- CVE-2026-33686 · CVE Program
- CVE-2026-33686 · NVD
- FIRST EPSS
- GHSA-9ffq-6457-8958 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences