Sharp is Vulnerable to Path Traversal via Unsanitized Extension in FileUtil
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| code16 | sharp | affected |
|
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Code16 | Sharp |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-9ffq-6457-8958 | Sharp is Vulnerable to Path Traversal via Unsanitized Extension in FileUtil |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.569% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| CPEs | cpe:2.3:a:code16:sharp:*:*:*:*:*:*:*:* |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Code16
Code16 sharp |
|
| Vendors & Products |
Code16
Code16 sharp |
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Sharp is Vulnerable to Path Traversal via Unsanitized Extension in FileUtil | |
| Weaknesses | CWE-22 | |
| References |
| |
| Metrics |
cvssV3_1
|