CVE-2026-33686
Received Received - Intake
Path Traversal in Sharp CMS FileUtil Allows Arbitrary File Access

Publication date: 2026-03-26

Last updated on: 2026-04-01

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-26
Last Modified
2026-04-01
Generated
2026-05-27
AI Q&A
2026-03-27
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
code16 sharp to 9.20.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Sharp content management framework for Laravel, specifically in versions prior to 9.20.0. It is a path traversal vulnerability found in the FileUtil class. The issue arises because the application does not properly sanitize file extensions, allowing path separators to be passed into the storage layer. The vulnerable function, FileUtil::explodeExtension(), extracts a file's extension by splitting the filename at the last dot, which can be exploited. The vulnerability was fixed in version 9.20.0 by using a safer method to extract the extension and applying strict regex sanitization.


How can this vulnerability impact me? :

This vulnerability can have severe impacts as indicated by its CVSS score of 8.8. An attacker with low privileges can exploit the path traversal flaw to access or modify files outside the intended storage directories. This can lead to full compromise of confidentiality, integrity, and availability of the affected system, potentially allowing unauthorized access to sensitive data, modification of files, or disruption of services.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, you should upgrade Sharp to version 9.20.0 or later, where the path traversal issue in the FileUtil class has been patched.

The patch involves proper sanitization of file extensions using pathinfo(PATHINFO_EXTENSION) instead of strrpos(), and applying strict regex replacements to both the base name and the extension.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart