6.5medium
GoDoxy has a Path Traversal Vulnerability in its File API
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4753-cmc8-8j9vGO-2026-4817
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| yusing godoxy | < 0.27.5 | CVE List |
| github.com/yusing/godoxy (Go) | before 0.27.5 | GitHub Advisory Database, Go Vulnerability Database |
| godoxy godoxy | before 0.27.5 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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:
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 absolutepath.Join("config", "../certs/key.pem")normalizes to"certs/key.pem"— escapingconfig/- 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:
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
image
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:
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
}
Go Vulnerability Database
GoDoxy has a Path Traversal Vulnerability in its File API in github.com/yusing/godoxy
NVD (es)
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.
References
| https://github.com/yusing/godoxy/security/advisories/GHSA-4753-cmc8-8j9v | advisory, exploit, mitigation, vendor-advisory, web | |
| https://github.com/yusing/godoxy/commit/a541d75bb50f1b542c096d8bc8082c3549f5c059 | fix, patch, web | |
| https://github.com/yusing/godoxy/releases/tag/v0.27.5 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-33528 | advisory | |
| https://github.com/yusing/godoxy | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-33528 changed 2026-03-27 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4753-cmc8-8j9v changed 2026-03-27 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4817 changed 2026-03-26 | CC-BY-4.0 |
| NVD | CVE-2026-33528 changed 2026-06-17 | Public domain |