CVE-2026-35392
Path Traversal in goshs PUT Upload Allows Arbitrary File Write
Publication date: 2026-04-06
Last updated on: 2026-04-09
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| goshs | goshs | 2.0.0 |
| goshs | goshs | to 2.0.0 (exc) |
| goshs | goshs | 2.0.0 |
Helpful Resources
Exploitability
| 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?
The vulnerability exists in goshs, a SimpleHTTPServer written in Go. Before version 2.0.0-beta.3, the PUT upload functionality in the file httpserver/updown.go did not perform path sanitization. This means that the server could accept and process file upload paths without validating or cleaning them, potentially allowing malicious users to upload files to unintended locations.
How can this vulnerability impact me? :
Because the PUT upload feature lacks path sanitization, an attacker could exploit this to upload files to arbitrary locations on the server. This can lead to severe impacts including unauthorized modification or replacement of critical files, remote code execution, and full system compromise.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade goshs to version 2.0.0-beta.3 or later, where the path sanitization issue in the PUT upload functionality has been fixed.