CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-66063

CVE-2026-66063: Path Traversal Arbitrary File Write and Access Control Bypass in goshs

Alon Barad
Alon Barad
Software Engineer

Jul 29, 2026·4 min read·3 visits

Executive Summary (TL;DR)

An unauthenticated path traversal vulnerability in the goshs multipart upload handler allows arbitrary file writes outside the served directory.

CVE-2026-66063 is an unauthenticated directory traversal and arbitrary file write vulnerability in goshs before version 2.1.5. Due to improper sanitization of file upload names, an unauthenticated attacker can write files outside the served web root. A related trailing slash bypass in the same version allows unauthorized file retrieval.

Vulnerability Overview

goshs is a file server built in Go designed to facilitate file sharing and directory serving. It features administrative facilities, such as path-based access control list (ACL) rules stored in .goshs files, to restrict resource access. Unauthenticated users can access the server's public endpoints, including the multipart upload handler.\n\nThis security report covers CVE-2026-66063, a medium-severity directory traversal flaw in the multipart upload parser. In parallel, researchers addressed an access control bypass issue involving path-canonicalization differences when handling trailing slashes. Both flaws permit attackers to subvert the configured directory restrictions.

Root Cause Analysis

The root cause of CVE-2026-66063 resides in the upload utility function located inside httpserver/updown.go. When a multipart upload is initiated, the server retrieves the client-supplied filename from the request headers. The application attempts to prevent directory traversal by splitting the path string on forward slash characters and selecting the final slice element.\n\nThis sanitization pattern fails to handle input where the final element of the path is a double-dot (..) sequence. When an attacker provides a filename of '..', the splitting logic extracts '..' as the sanitized filename. The server then executes filepath.Join with targetDir and the traversal sequence, returning the parent folder of the served root.\n\nFinally, the code appends a trailing tilde character to the resolved destination path to create a temporary write location. The application calls os.Create on this out-of-bounds destination. Consequently, the application writes the uploaded content to a file located outside the served directory structure.

Code Analysis

Prior to version 2.1.5, the path cleaning logic in httpserver/updown.go used the following sequence:\n\ngo\nfilenameSlice := strings.Split(part.FileName(), \"/\")\nfilenameClean := filenameSlice[len(filenameSlice)-1]\n\nif filenameClean == \".goshs\" {\n logger.Warnf(\"blocked attempt to upload file named .goshs\")\n continue\n}\n\nfinalPath := filepath.Join(targetDir, filenameClean)\ntempPath := finalPath + \"~\"\ndst, err := os.Create(tempPath)\n\n\nThe code contains no validation to reject empty strings, single dots, or double dots. The developers resolved this in commit f3ef599e409151d1380866e47de8b1afb0bb54fa by implementing boundary checks on the extracted filename:\n\ngo\nif filenameClean == \"\" || filenameClean == \".\" || filenameClean == \"..\" {\n logger.Warnf(\"blocked upload with invalid filename %q\", part.FileName())\n continue\n}\n\n\nAdditionally, a defense-in-depth sanitization layer was added using the sanitizePath function. This validates that the resolved absolute path of the uploaded file resides within the boundary of the target directory:\n\ngo\nif _, err := sanitizePath(targetDir, filenameClean); err != nil {\n logger.Warnf(\"blocked upload escaping target directory: %q\", part.FileName())\n continue\n}\n

Exploitation Methodology

To exploit CVE-2026-66063, an unauthenticated attacker sends an HTTP POST request targeting the /upload endpoint. The payload is structured as multipart/form-data. The attacker specifies a filename attribute of '..' within the content disposition header.\n\nhttp\nPOST /upload HTTP/1.1\nHost: vulnerable-goshs-server:8000\nContent-Type: multipart/form-data; boundary=---------------------------97384973289\n\n-----------------------------97384973289\nContent-Disposition: form-data; name=\"files\"; filename=\"..\"\nContent-Type: text/plain\n\nPAYLOAD_CONTENT\n-----------------------------97384973289--\n\n\nThe server receives this request, processes the part, and creates a temporary file appended with a tilde in the parent directory of targetDir. For instance, if targetDir is /opt/shared, the server writes the payload to /opt/shared~.\n\nTo exploit the trailing slash access control bypass, an attacker issues a GET request targeting a restricted file name appended with a trailing slash, such as /blocked/secret.txt/. The server checks the URI segment which resolves to an empty string, bypasses the blocklist, and subsequently uses Go's file system handler to open and return the blocked file.

Impact Assessment

The primary impact of CVE-2026-66063 is unauthenticated arbitrary file write capabilities. However, because the server appends a trailing tilde character to the target path, the attacker cannot overwrite arbitrary existing files directly. They are instead restricted to creating new files with a trailing tilde in the parent directory of the served web root.\n\nThe secondary impact is the exposure of sensitive files protected by directory-level ACLs. Attackers can bypass access controls to download private files, such as internal keys or configuration files, by appending a trailing slash to the target path. The combined effect of these vulnerabilities lowers the overall security posture of the host system.\n\nThe CVSS v3.1 base score is 6.5, reflecting a medium-severity rating. The attack vector is Network, complexity is Low, and no privileges are required to perform the exploits.

Remediation and Mitigation

The most effective remediation is upgrading the goshs installation to version 2.1.5 or newer. This version resolves the directory traversal vulnerability by rejecting invalid filename patterns and validates path canonicalization.\n\nIf upgrading is not immediately possible, apply the following mitigations:\n\n* Interface Binding: Bind the goshs server to the loopback interface (127.0.0.1) instead of public interfaces to prevent external access.\n* Reverse Proxy Normalization: Implement a reverse proxy, such as Nginx or Caddy, configured to sanitize URI paths. Ensure the proxy cleans trailing slashes and blocks double-dot traversal sequences before passing requests to the backend.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected Systems

goshs server deployments with upload functionality enabled

Affected Versions Detail

Product
Affected Versions
Fixed Version
goshs
goshs-labs
< 2.1.52.1.5
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork (AV:N)
CVSS v3.16.5
Exploit StatusPoC level
KEV StatusNot listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1083File and Directory Discovery
Discovery
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as '..' that can resolve to a location outside of the directory.

Known Exploits & Detection

GitHub Security AdvisoryPoC and technical regression tests detailed in advisory repository

References & Sources

  • [1]GHSA-wg2q-39h6-66x9
  • [2]Fix Commit Patch
  • [3]CVE Record Database

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•16 minutes ago•CVE-2026-64863
9.1

CVE-2026-64863: WebDAV MOVE Bypass of --no-delete and --upload-only Restrictive Policies in goshs

An access control bypass vulnerability in goshs prior to version 2.1.4 allows unauthenticated remote attackers to bypass security flags intended to prevent file deletion and unauthorized modification. By exploiting the server's incorrect classification of WebDAV MOVE and overwriting COPY methods, attackers can execute arbitrary file deletion and data manipulation on the host system.

Amit Schendel
Amit Schendel
1 views•10 min read
•about 2 hours ago•CVE-2026-54638
7.5

CVE-2026-54638: Pre-Authentication Denial of Service via Unbounded Memory Allocation in gotd/td MTProto Parser

An unauthenticated remote Denial of Service (DoS) vulnerability exists in the plaintext message parsing implementation of gotd/td, a Go-based Telegram MTProto client and server library. The security flaw is located within the unencrypted message decoding pipeline, where the parser reads an untrusted length header and immediately performs a heap-based memory allocation without checking if the buffer contains the corresponding bytes. An attacker can exploit this behavior by sending a single crafted 20-byte packet containing an extremely large length value, leading to immediate memory exhaustion and process termination by the operating system Out-Of-Memory (OOM) killer.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 3 hours ago•CVE-2026-54658
9.8

CVE-2026-54658: SQL Injection via Parameter Escaping Bypass in @hypequery/clickhouse

A critical SQL injection vulnerability was identified in @hypequery/clickhouse prior to version 2.0.2. The escapeValue utility function in packages/clickhouse/src/core/utils.ts fails to escape literal backslash characters before replacing single quotes. This allows remote, unauthenticated attackers to supply input parameters ending in a backslash, neutralizing the closing quote character inside ClickHouse databases and enabling arbitrary SQL execution.

Alon Barad
Alon Barad
4 views•5 min read
•about 4 hours ago•CVE-2026-54650
8.6

CVE-2026-54650: Remote Path Traversal in openhole-server and openhole CLI Client

A critical path traversal vulnerability (CWE-22) in openhole-server version 0.1.1 and earlier allows remote, unauthenticated attackers to traverse directories and access restricted files or endpoints on local backend services exposed via the tunnel proxy. The issue stems from improper handling of decoded URL paths inside the proxy handler, which are then reconstructed and executed literally by the CLI client.

Alon Barad
Alon Barad
5 views•5 min read
•about 5 hours ago•CVE-2026-54639
8.8

CVE-2026-54639: Prototype Pollution and Patch Bypass in style-dictionary

A critical prototype pollution vulnerability (CVE-2026-54639) exists in style-dictionary versions 4.3.0 through 5.4.3 due to unsafe object traversal in the convertTokenData utility. Although a patch was released in version 5.4.4 targeting '__proto__', a complete bypass is possible using 'constructor.prototype', leading to persistent global prototype pollution and potential remote code execution.

Alon Barad
Alon Barad
5 views•6 min read
•about 6 hours ago•CVE-2025-6120
5.3

CVE-2025-6120: Heap-Based Buffer Overflow in Assimp HL1MDLLoader read_meshes

CVE-2025-6120 is a critical memory corruption vulnerability in the Open Asset Import Library (Assimp) affecting versions up to and including 5.4.3. The flaw is located in the Half-Life 1 MDL file format loader, specifically within the read_meshes function in HL1MDLLoader.cpp. It arises due to a lack of verification checks on array, bone, skin, or vertex indices parsed directly from a binary stream, resulting in a heap-based buffer overflow or out-of-bounds memory access.

Alon Barad
Alon Barad
5 views•5 min read