Security Resilience

CVE-2026-40189

Access Control in Goshs ≤ 2.0.0

Public PoCAccess Control
Published
10 April 2026
Modified
26 October 2026
Patch / advisory
CVSS Score v4 9.3
Click a component to see what it means
Raw vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0069 48th percentile
Risk Priority 47 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-40189 is a critical-severity Missing Authorization (CWE-862) vulnerability in Goshs. Its CVSS base score is 9.3 (Critical).

Operationally, ranked at the 48th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to AC-24 (Access Control Decisions) and AC-25 (Reference Monitor) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-40189 is a critical authorization bypass vulnerability (CWE-862) in goshs, a SimpleHTTPServer implementation written in Go. In versions prior to 2.0.0-beta.4, the server enforces per-folder .goshs ACL/basic-auth mechanisms for directory listings and file reads, but fails to apply the same checks to state-changing routes. This allows unauthorized modifications within protected directories, with a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

An unauthenticated remote attacker can exploit this vulnerability by sending requests such as PUT to upload files, multipart POST to /upload, ?mkdir to create directories, or ?delete to remove files, all within .goshs-protected directories. By specifically deleting the .goshs file itself, the attacker can eliminate the folder's authentication policy, gaining unauthorized access to previously protected content. This compromises confidentiality, integrity, and availability of served files.

The vulnerability is fixed in goshs version 2.0.0-beta.4. Security practitioners should upgrade to this version or later. Relevant resources include the fixing commit at https://github.com/patrickhener/goshs/commit/f212c4f4a126556bab008f79758e21a839ef2c0f, the release page at https://github.com/patrickhener/goshs/releases/tag/v2.0.0-beta.4, and the GitHub security advisory at https://github.com/patrickhener/goshs/security/advisories/GHSA-wvhv-qcqf-f3cx.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

goshs is a SimpleHTTPServer written in Go. Prior to 2.0.0-beta.4, goshs enforces the documented per-folder .goshs ACL/basic-auth mechanism for directory listings and file reads, but it does not enforce the same authorization checks for state-changing routes. An unauthenticated attacker can…

more

upload files with PUT, upload files with multipart POST /upload, create directories with ?mkdir, and delete files with ?delete inside a .goshs-protected directory. By deleting the .goshs file itself, the attacker can remove the folder's auth policy and then access previously protected content without credentials. This results in a critical authorization bypass affecting confidentiality, integrity, and availability. This vulnerability is fixed in 2.0.0-beta.4.

CWE(s)

Related Threats

CVEs Like This One

CVE-2024-32517Shared CWE-862
CVE-2024-49325Shared CWE-862
CVE-2023-21388Shared CWE-862
CVE-2024-34372Shared CWE-862
CVE-2024-9583Shared CWE-862
CVE-2025-48272Shared CWE-862
CVE-2025-2103Shared CWE-862
CVE-2024-47317Shared CWE-862
CVE-2024-12413Shared CWE-862
CVE-2025-31071Shared CWE-862

Affected Assets

goshs
goshs
2.0.0 · ≤ 2.0.0

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

AC-3 directly requires enforcement of authorization decisions on every access request, structurally eliminating missing authorization checks.

AC-24 mandates that access control decisions are applied to each request, preventing bypass of authorization logic.

AC-25 requires a tamperproof, always-invoked reference monitor that ensures authorization checks cannot be omitted.

AC-6 reduces the set of actions reachable without proper authorization, limiting blast radius of missing checks.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

By requiring competent outsiders to verify that every function enforces the need-to-know principle, the control lowers the likelihood that missing authorization checks persist undetected.

blocks

A.8.3's purpose is to ensure only authorized access, and its guidance directly mandates the authorization checks that CWE-862 describes as missing, so a well-implemented access restriction control fully blocks exploitation of the missing authorization weakness.

blocks

Requiring evidence of minimum security capabilities and acceptance testing ensures that missing or bypassed authorization checks are detected before the delivered software is accepted.

finds

Mandating read-only access or proxy execution by an authorized administrator ensures every requested operation is explicitly authorized before it occurs.

blocks

Mandatory authorization checks before allowing modifications ensure that every sensitive action on source code is preceded by an explicit access-control decision.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-862, a class-level weakness, and none of its children carries one either.

References