CVE-2026-66063: Goshs.de/goshs/v2 Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-wg2q-39h6-66x9
CVSS 6.5
CWE-22
Published
Advisory Summary

CVE-2026-66063 is a MODERATE (CVSS 6.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Goshs.de/goshs/v2 libraries in the Go ecosystem. The issue involves goshs has a path traversal issue. Remediation is available by upgrading affected packages to version 2.1.5-0.20260727065949-f3ef599e4091.

CVE-2026-66063 at a Glance

CVE Identifier CVE-2026-66063
GHSA Identifier GHSA-wg2q-39h6-66x9
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Goshs.de/goshs/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-66063

To remediate this vulnerability, upgrade all affected Goshs.de/goshs/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

goshs.de/goshs/v2 fixed: 2.1.5-0.20260727065949-f3ef599e4091
Upgrade goshs.de/goshs/v2 to 2.1.5-0.20260727065949-f3ef599e4091
github.com/patrickhener/goshs/v2 fixed: 2.1.5-0.20260727065949-f3ef599e4091
Upgrade github.com/patrickhener/goshs/v2 to 2.1.5-0.20260727065949-f3ef599e4091
goshs.de/goshs fixed: Latest secure release
Upgrade goshs.de/goshs to Latest secure release
github.com/patrickhener/goshs fixed: Latest secure release
Upgrade github.com/patrickhener/goshs to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for goshs.de/goshs/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-66063, inspect your project dependencies for Goshs.de/goshs/v2:

inspect dependencies for goshs.de/goshs/v2

Analyze the terminal output to locate any version of Goshs.de/goshs/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.5-0.20260727065949-f3ef599e4091), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Goshs.de/goshs/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The multipart upload filename fix splits on the path separator but never rejects dot-dot, allowing a write outside the served tree. ## Finding (Medium): upload filename escapes the served tree (residual of CVE-2026-35393) The multipart filename fix (updown.go lines 135-136) splits on the path separator but never rejects "..". Uploading with filename=".." results in os.Create against the parent of the upload folder with a trailing marker character, outside the served tree, and the subsequent failed rename leaves that file behind. Verified: a file containing ESCAPED_WRITE_PROOF was written outside the webroot, unauthenticated, with the default configuration. Not claimed: a Windows-specific variant (Go's Part.FileName() already applies filepath.Base). ## Suggested fixes 1. Reject any upload filename that is "..", is empty after sanitisation, or resolves outside the upload folder; validate the final resolved destination rather than only transforming the input. ## Tooling AI assistance was used while investigating. The finding was reproduced against a running server on loopback.

CVE-2026-66063 Affected Goshs.de/goshs/v2 Versions

4 component(s)
Fixed Versions:
2.1.5-0.20260727065949-f3ef599e4091
Product / Package Ecosystem Affected Versions Fixed Version
goshs.de/goshs/v2
Go
< 2.1.5-0.20260727065949-f3ef599e4091
2.1.5-0.20260727065949-f3ef599e4091
github.com/patrickhener/goshs/v2
Go
< 2.1.5-0.20260727065949-f3ef599e4091
2.1.5-0.20260727065949-f3ef599e4091
goshs.de/goshs
Go
≤ 1.1.4
github.com/patrickhener/goshs
Go
≤ 1.1.4

References

Frequently Asked Questions

What is CVE-2026-66063?
CVE-2026-66063 is a security vulnerability in Goshs.de/goshs/v2 involving goshs has a Path Traversal issue under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Goshs.de/goshs/v2 versions are affected?
Affected versions include releases prior to 2.1.5-0.20260727065949-f3ef599e4091 across affected packages: goshs.de/goshs/v2, github.com/patrickhener/goshs/v2, goshs.de/goshs, github.com/patrickhener/goshs.
What version fixes CVE-2026-66063?
Upgrading to 2.1.5-0.20260727065949-f3ef599e4091 (or the latest patched release for your respective branch) resolves the vulnerability.
Is goshs.de/goshs/v2 affected?
Yes, goshs.de/goshs/v2 is affected in releases prior to 2.1.5-0.20260727065949-f3ef599e4091. Upgrade your dependency to 2.1.5-0.20260727065949-f3ef599e4091 or later.
Is github.com/patrickhener/goshs/v2 affected?
Yes, github.com/patrickhener/goshs/v2 is affected in releases prior to 2.1.5-0.20260727065949-f3ef599e4091. Upgrade your dependency to 2.1.5-0.20260727065949-f3ef599e4091 or later.
What is the CVSS score of CVE-2026-66063?
CVE-2026-66063 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-66063?
CVE-2026-66063 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-66063?
Run the dependency tree command: 'inspect dependencies for goshs.de/goshs/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wg2q-39h6-66x9",
  "modified" : "2026-07-28T22:10:01Z",
  "published" : "2026-07-28T22:08:53Z",
  "aliases" : [ "CVE-2026-66063" ],
  "summary" : "goshs has a Path Traversal issue",
  "details" : "## Summary\n\nThe multipart upload filename fix splits on the path separator but never rejects dot-dot, allowing a write outside the served tree.\n\n## Finding (Medium): upload filename escapes the served tree (residual of CVE-2026-35393)\n\nThe multipart filename fix (updown.go lines 135-136) splits on the path separator but never rejects \"..\". Uploading with filename=\"..\" results in os.Create against the parent of the upload folder with a trailing marker character, outside the served tree, and the subsequent failed rename leaves that file behind. Verified: a file containing ESCAPED_WRITE_PROOF was written outside the webroot, unauthenticated, with the default configuration. Not claimed: a Windows-specific variant (Go's Part.FileName() already applies filepath.Base).\n\n## Suggested fixes\n\n1. Reject any upload filename that is \"..\", is empty after sanitisation, or resolves outside the upload folder; validate the final resolved destination rather than only transforming the input.\n\n## Tooling\n\nAI assistance was used while investigating. The finding was reproduced against a running server on loopback.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "goshs.de/goshs/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.5-0.20260727065949-f3ef599e4091"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.4"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/patrickhener/goshs/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.5-0.20260727065949-f3ef599e4091"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.4"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "goshs.de/goshs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.1.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/patrickhener/goshs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.1.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/goshs-labs/goshs/security/advisories/GHSA-wg2q-39h6-66x9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goshs-labs/goshs/commit/f3ef599e409151d1380866e47de8b1afb0bb54fa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/goshs-labs/goshs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-28T22:08:53Z",
    "nvd_published_at" : null
  }
}