Skip to main content

goshs EUVDEUVD-2026-27067

| CVE-2026-42091 MEDIUM
Cross-Site Request Forgery (CSRF) (CWE-352)
2026-05-04 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Victim visits malicious website
  2. Delivery
    Browser sends OPTIONS preflight to goshs
  3. Exploit
    Wildcard CORS response allows cross-origin requests
  4. Install
    Browser sends crafted PUT request with file content
  5. C2
    PUT handler receives request without CSRF check
  6. Execute
    File written to goshs webroot
  7. Impact
    Attacker achieves arbitrary file write

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Anti-CSRF tokens, SameSite cookies
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

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

Exploitation Conditions

Exploitation requires: (1) the victim must have a goshs instance accessible from their browser (localhost:8000 or internal network URL), (2) the goshs instance must be running a version prior to 2.0.2 (v2.x) or any v1.x version, (3) the victim must visit a website controlled or compromised by the attacker while the goshs instance is running and accessible, and (4) for v2.x, basic HTTP authentication must NOT be configured (if basic auth is enabled, browsers cannot attach credentials to preflight requests, blocking exploitation). The attack vector is network-based and requires no authentication to the goshs server itself (the victim's browser credentials for localhost are implicit). User interaction is mandatory: the victim must visit a third-party website. No special goshs configuration beyond default settings is required to be vulnerable.

Impact

This vulnerability presents moderate-to-high real-world risk despite a CVSS score of 6.5. CVSS assigns medium severity (6.5) because user interaction is required (UI:R - the victim must visit a malicious website) and the attack vector is network-based but limited by same-origin policy circumvention (AV:N/AC:L/PR:N indicates no authentication needed and low complexity). However, the practical impact is significant: the vulnerability enables silent file overwrite on networked instances, particularly affecting deployments on localhost or internal networks where administrators may assume security through isolation. The combination of CSRF-less PUT + wildcard CORS creates a complete attack chain with publicly available exploit code, elevating real-world risk. Exploitation requires only that a victim with browser access to the goshs server visits a malicious website - a realistic threat in mixed-trust environments (e.g., developer accessing both internal file server and untrusted web content). The presence of a proof-of-concept (poc.zip in advisory) confirms exploitability. The limiting factor is scope (S:U - no privilege escalation), meaning the attacker cannot execute code or escalate privileges, only write files; this constrains but does not eliminate risk, as file overwrites can corrupt applications, inject malicious content (e.g., replacing HTML/JS served by goshs), or create denial-of-service conditions. For v1.x users, the absence of a vendor patch increases risk persistence.

Exploit ScenarioDerived

An attacker hosts a malicious website containing JavaScript that uses XMLHttpRequest or Fetch to send a PUT request to http://localhost:8000/malicious.html (or any target goshs server). When a developer or user with access to a goshs instance visits the attacker's site, the victim's browser automatically includes the request. The browser first sends an OPTIONS preflight request, which goshs responds to with Access-Control-Allow-Origin: *, allowing the PUT to proceed. The PUT request then reaches the PUT handler, which lacks CSRF validation, and the file is written to the goshs webroot. The attacker can overwrite existing files, inject malicious content into served HTML/JS, or create new files.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – May 04, 2026

goshs SimpleHTTPServer versions prior to 2.0.2 allow arbitrary file write via cross-origin PUT requests due to missing CSRF token validation on the PUT handler combined with permissive wildcard CORS headers. An attacker can trick a victim into visiting a malicious website which then writes arbitrary files to a goshs instance running on localhost or an internal network, bypassing network isolation protections. Publicly available exploit code exists, and the vulnerability affects all v2.x releases before 2.0.2 and all v1.x releases (no patch available for v1.x).

RemediationAI

Upgrade goshs to version 2.0.2 or later immediately. The patch adds CSRF token validation to the PUT handler (httpserver/updown.go:19) to match the POST handler protection, and modifies CORS handling to only enforce CSRF checks in unauthenticated deployments (when basic auth is not configured). For users unable to upgrade immediately, enable HTTP Basic Authentication (goshs -b flag or equivalent) on all instances; this mitigates the vulnerability because browsers cannot attach credentials to CORS preflight requests, causing the preflight to fail and preventing the actual PUT request from reaching the server. However, basic auth adds authentication overhead and is a compensating control, not a complete fix - upgrade to 2.0.2 is the only reliable remediation. Users on v1.x (1.1.4 and earlier) must migrate to v2.0.2 as no patch is available for v1.x. See GitHub advisory https://github.com/patrickhener/goshs/security/advisories/GHSA-rhf7-wvw3-vjvm and release page https://github.com/patrickhener/goshs/releases/tag/v2.0.2.

Affected VersionsENISA

goshs < 2.0.2

Affected Packages

go github.com/patrickhener/goshs no fix
go github.com/patrickhener/goshs/v2 fix: 2.0.2
go goshs.de/goshs no fix
go goshs.de/goshs/v2 fix: 2.0.2
euvd goshs fix: 2.0.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 5 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

goshs is a lightweight HTTP file server written in Go that supports file upload and download. The vulnerability exploits two weaknesses in the HTTP request handling layer: (1) the PUT upload handler in httpserver/updown.go was not updated to include CSRF token validation when a similar fix was applied to the POST handler during the prior CVE-2026-40883 remediation, and (2) the OPTIONS preflight handler in httpserver/server.go returns Access-Control-Allow-Origin: * unconditionally, which allows browsers executing JavaScript from any origin to pass CORS preflight checks and send PUT requests. The root cause is CWE-352 (Cross-Site Request Forgery), where the application fails to validate that file-upload requests originate from the legitimate goshs web interface rather than a third-party website. Combined, these weaknesses allow cross-origin file uploads: a victim's browser receives a CORS preflight (OPTIONS) response permitting PUT, then the actual PUT request proceeds without CSRF token verification, resulting in arbitrary file write to the goshs webroot.

Know when Goshs gets its next vulnerability

  • 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 (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
SUSE MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
May 04, 2026 - 19:17 EUVD
CVE Published
May 04, 2026 - 17:24 nvd
MEDIUM 6.5

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
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· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

Vendor StatusVendor

SUSE

Severity: Medium

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