Vulnerabilities in pkg:golang/github.com/yusing/godoxy

PACKAGE
Advisory Identifier: GHSA-4753-cmc8-8j9v
Advisory Summary

CVE-2026-33528 is a MODERATE (CVSS 6.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/yusing/godoxy libraries in the Go ecosystem. The issue involves godoxy has a path traversal vulnerability in its file api. Remediation is available by upgrading affected packages to version 0.27.5.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/yusing/godoxy

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/yusing/godoxy. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4753-cmc8-8j9v CVE-2026-33528 MODERATE GoDoxy has a Path Traversal Vulnerability in its File API

CVE-2026-33528 at a Glance

CVE Identifier CVE-2026-33528
GHSA Identifier GHSA-4753-cmc8-8j9v
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 Github.com/yusing/godoxy
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:H/UI:N/S:U/C:H/I:H/A:N).

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

How to Fix CVE-2026-33528

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

github.com/yusing/godoxy fixed: 0.27.5
Upgrade github.com/yusing/godoxy to 0.27.5
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 github.com/yusing/godoxy

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33528, inspect your project dependencies for Github.com/yusing/godoxy:

inspect dependencies for github.com/yusing/godoxy

Analyze the terminal output to locate any version of Github.com/yusing/godoxy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.27.5), 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 Github.com/yusing/godoxy, 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 file content API endpoint at `/api/v1/file/content` is vulnerable to path traversal. The `filename` query parameter is passed directly to `path.Join(common.ConfigBasePath, filename)` where `ConfigBasePath = "config"` (a relative path). No sanitization or validation is applied beyond checking that the field is non-empty (`binding:"required"`). An authenticated attacker can use `../` sequences to read or write files outside the intended `config/` directory, including TLS private keys, OAuth refresh tokens, and any file accessible to the container's UID. ## Root Cause **File:** `internal/api/v1/file/get.go`, lines 68-73: ```go func (t FileType) GetPath(filename string) string { if t == FileTypeMiddleware { return path.Join(common.MiddlewareComposeBasePath, filename) } return path.Join(common.ConfigBasePath, filename) } ``` - `common.ConfigBasePath = "config"` — relative path, not absolute - `path.Join("config", "../certs/key.pem")` normalizes to `"certs/key.pem"` — escaping `config/` - No call to `strings.HasPrefix`, `filepath.Rel`, or any containment check exists - The `format:"filename"` struct tag is an OpenAPI/Swagger annotation only, not enforced by the validator ## Proof of Concept ### Environment - GoDoxy v0.27.4 (`ghcr.io/yusing/godoxy:latest`) - Authentication enabled with default credentials (`admin`/`password`) ### Steps to Reproduce **Step 1 — Authenticate:** **Step 2 — Read file outside config/ via path traversal:** ```http GET /api/v1/file/content?type=config&filename=../certs/secret-agent-key.pem HTTP/1.1 Host: localhost:8888 Cookie: godoxy_token=<JWT> ``` ### HTTP Response ``` HTTP/1.1 200 OK Cache-Control: no-cache, no-store, must-revalidate Content-Length: 43 Content-Type: application/godoxy+yaml Expires: 0 Pragma: no-cache THIS_IS_A_SECRET_PRIVATE_KEY_FOR_AGENT_TLS ``` <img width="1489" height="286" alt="image" src="https://github.com/user-attachments/assets/05f3464f-20ba-4913-830d-9fcc2fa1a2e3" /> ## Impact ### Files accessible via this vulnerability | Path (relative to `config/`) | Contents | Risk | |-------------------------------|----------|------| | `../certs/agents/{host}.zip` | CA cert + server cert + **TLS private key** | Impersonate GoDoxy server to remote agents | | `../data/oauth_refresh_tokens.json` | OIDC refresh tokens for all active sessions | Account takeover via token reuse | | `../../etc/ssl/certs/ca-certificates.crt` | System CA certificates | Information disclosure | | Any file readable by UID 1000 | Depends on mounted volumes | Variable | The `PUT /api/v1/file/content` endpoint is also affected. While the content must pass YAML schema validation (config or provider format), an attacker can write valid provider YAML files outside `config/`, potentially injecting malicious route definitions. ## Suggested Remediation Validate that the resolved path remains within the base directory: ```go func (t FileType) GetPath(filename string) (string, error) { var base string if t == FileTypeMiddleware { base = common.MiddlewareComposeBasePath } else { base = common.ConfigBasePath } absBase, _ := filepath.Abs(base) resolved, _ := filepath.Abs(filepath.Join(base, filename)) if !strings.HasPrefix(resolved, absBase+string(filepath.Separator)) { return "", fmt.Errorf("path traversal detected: %s", filename) } return resolved, nil } ```

CVE-2026-33528 Affected Github.com/yusing/godoxy Versions

1 component(s)
Fixed Versions:
0.27.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/yusing/godoxy
Go
< 0.27.5
0.27.5

References

Frequently Asked Questions

What is CVE-2026-33528?
CVE-2026-33528 is a security vulnerability in Github.com/yusing/godoxy involving GoDoxy has a Path Traversal Vulnerability in its File API under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/yusing/godoxy versions are affected?
Affected versions include releases prior to 0.27.5 across affected packages: github.com/yusing/godoxy.
What version fixes CVE-2026-33528?
Upgrading to 0.27.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/yusing/godoxy affected?
Yes, github.com/yusing/godoxy is affected in releases prior to 0.27.5. Upgrade your dependency to 0.27.5 or later.
What is the CVSS score of CVE-2026-33528?
CVE-2026-33528 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-33528?
CVE-2026-33528 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-33528?
Run the dependency tree command: 'inspect dependencies for github.com/yusing/godoxy'. 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-4753-cmc8-8j9v",
  "modified" : "2026-03-27T21:18:00Z",
  "published" : "2026-03-24T16:35:30Z",
  "aliases" : [ "CVE-2026-33528" ],
  "summary" : "GoDoxy has a Path Traversal Vulnerability in its File API",
  "details" : "## Summary\n\nThe file content API endpoint at `/api/v1/file/content` is vulnerable to path traversal. The `filename` query parameter is passed directly to `path.Join(common.ConfigBasePath, filename)` where `ConfigBasePath = \"config\"` (a relative path). No sanitization or validation is applied beyond checking that the field is non-empty (`binding:\"required\"`).\n\nAn authenticated attacker can use `../` sequences to read or write files outside the intended `config/` directory, including TLS private keys, OAuth refresh tokens, and any file accessible to the container's UID.\n\n## Root Cause\n\n**File:** `internal/api/v1/file/get.go`, lines 68-73:\n\n```go\nfunc (t FileType) GetPath(filename string) string {\n    if t == FileTypeMiddleware {\n        return path.Join(common.MiddlewareComposeBasePath, filename)\n    }\n    return path.Join(common.ConfigBasePath, filename)\n}\n```\n\n- `common.ConfigBasePath = \"config\"` — relative path, not absolute\n- `path.Join(\"config\", \"../certs/key.pem\")` normalizes to `\"certs/key.pem\"` — escaping `config/`\n- No call to `strings.HasPrefix`, `filepath.Rel`, or any containment check exists\n- The `format:\"filename\"` struct tag is an OpenAPI/Swagger annotation only, not enforced by the validator\n\n## Proof of Concept\n\n### Environment\n\n- GoDoxy v0.27.4 (`ghcr.io/yusing/godoxy:latest`)\n- Authentication enabled with default credentials (`admin`/`password`)\n\n### Steps to Reproduce\n\n**Step 1 — Authenticate:**\n\n**Step 2 — Read file outside config/ via path traversal:**\n\n```http\nGET /api/v1/file/content?type=config&filename=../certs/secret-agent-key.pem HTTP/1.1\nHost: localhost:8888\nCookie: godoxy_token=<JWT>\n```\n\n### HTTP Response\n\n```\nHTTP/1.1 200 OK\nCache-Control: no-cache, no-store, must-revalidate\nContent-Length: 43\nContent-Type: application/godoxy+yaml\nExpires: 0\nPragma: no-cache\n\nTHIS_IS_A_SECRET_PRIVATE_KEY_FOR_AGENT_TLS\n```\n<img width=\"1489\" height=\"286\" alt=\"image\" src=\"https://github.com/user-attachments/assets/05f3464f-20ba-4913-830d-9fcc2fa1a2e3\" />\n\n## Impact\n\n### Files accessible via this vulnerability\n\n| Path (relative to `config/`) | Contents | Risk |\n|-------------------------------|----------|------|\n| `../certs/agents/{host}.zip` | CA cert + server cert + **TLS private key** | Impersonate GoDoxy server to remote agents |\n| `../data/oauth_refresh_tokens.json` | OIDC refresh tokens for all active sessions | Account takeover via token reuse |\n| `../../etc/ssl/certs/ca-certificates.crt` | System CA certificates | Information disclosure |\n| Any file readable by UID 1000 | Depends on mounted volumes | Variable |\n\nThe `PUT /api/v1/file/content` endpoint is also affected. While the content must pass YAML schema validation (config or provider format), an attacker can write valid provider YAML files outside `config/`, potentially injecting malicious route definitions.\n\n\n## Suggested Remediation\n\nValidate that the resolved path remains within the base directory:\n\n```go\nfunc (t FileType) GetPath(filename string) (string, error) {\n    var base string\n    if t == FileTypeMiddleware {\n        base = common.MiddlewareComposeBasePath\n    } else {\n        base = common.ConfigBasePath\n    }\n\n    absBase, _ := filepath.Abs(base)\n    resolved, _ := filepath.Abs(filepath.Join(base, filename))\n\n    if !strings.HasPrefix(resolved, absBase+string(filepath.Separator)) {\n        return \"\", fmt.Errorf(\"path traversal detected: %s\", filename)\n    }\n\n    return resolved, nil\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/yusing/godoxy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.27.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/yusing/godoxy/security/advisories/GHSA-4753-cmc8-8j9v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33528"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yusing/godoxy/commit/a541d75bb50f1b542c096d8bc8082c3549f5c059"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/yusing/godoxy"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yusing/godoxy/releases/tag/v0.27.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-24T16:35:30Z",
    "nvd_published_at" : "2026-03-26T20:16:14Z"
  }
}