CVE-2026-35392

goshs has an Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in goshs PUT Upload

Published Apr 6, 2026 CVSS 3.0 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.3, PUT upload in httpserver/updown.go has no path sanitization. This vulnerability is fixed in 2.0.0-beta.3.

Analysis

AI-generated

Technical impact

goshs, a lightweight HTTP server written in Go, allows clients to upload files with the HTTP PUT method without sanitizing the requested pathname. This omission permits an attacker to craft filenames that reference directories outside the intended upload directory, effectively creating or overwriting arbitrary files on the server's filesystem. The resulting vulnerability is a classic path traversal flaw that can compromise data integrity, confidentiality, and potentially enable remote code execution if the written files are executable or are placed in sensitive locations.

Affected Systems

The vulnerability exists in the patrickhener:goshs product and affects all releases prior to 2.0.0‑beta.3, including the 2.0.0‑beta.1 and 2.0.0‑beta.2 builds. The issue was addressed in version 2.0.0‑beta.3, which introduces pathname sanitization and limits upload operations to the designated directory.

Risk and Exploitability

With a CVSS score of 9.8 the flaw is classified as critical; the EPSS score below 1% indicates low current exploitation likelihood, but the vulnerability remains exploitable over an open network via unauthenticated HTTP PUT requests to any publicly reachable goshs instance. The flaw is not listed in the CISA KEV catalog, yet its high severity warrants immediate attention to prevent potential system compromise.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pacmanhener's goshs to version 2.0.0‑beta.3 or later to apply the path sanitization fix. Verify that the server’s PUT upload endpoint no longer allows filenames that navigate outside the intended directory.

Generated by OpenCVE AI on April 9, 2026 at 23:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-g8mv-vp7j-qp64 goshs: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in goshs PUT Upload
History
Type Values Removed Values Added
First Time appeared Goshs
Goshs goshs
CPEs cpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:*
cpe:2.3:a:goshs:goshs:2.0.0:beta1:*:*:*:go:*:*
cpe:2.3:a:goshs:goshs:2.0.0:beta2:*:*:*:go:*:*
Vendors & Products Goshs
Goshs goshs
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Patrickhener
Patrickhener goshs
Vendors & Products Patrickhener
Patrickhener goshs
Type Values Removed Values Added
Description goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.3, PUT upload in httpserver/updown.go has no path sanitization. This vulnerability is fixed in 2.0.0-beta.3.
Title goshs has an Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in goshs PUT Upload
Weaknesses CWE-22
References
Metrics cvssV3_0

{'score': 9.8, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 7, 2026, 4:19 PM
Reserved
Apr 2, 2026, 5:03 PM
Status
Analyzed
Published
Apr 6, 2026, 9:16 PM
Modified
Jul 24, 2026, 9:10 PM