# A read-only dashboard gave us code execution in Ping Identity's CI

Unauthenticated path parameter in Ping Identity's Nexus dashboard served arbitrary files, leaking GitHub tokens that enabled CI code execution and access to 2,500+ private repos.

- Payout: Research
- Severity: critical
- Program: Ping Identity
- Write-up by: Strix
- Disclosed: 2026-11-18
- Write-up quality: 8/10
- Original: https://www.strix.ai/blog/ping-identity-dashboard-ci-execution
- Library page: https://bugbountylibrary.com/r/blog%3Astrix-ai-blog-ping-identity-dashboard-ci-execution
- Tags: area:cloud domain:cloud domain:web impact:data-leak impact:rce kind:research platform:research sev:critical tech:ci-cd tech:github-actions technique:chained technique:recon technique:source-review vuln:auth-bypass vuln:info-disclosure vuln:path-traversal vuln:secrets-leak

**Target:** Nexus EngOps dashboard file-download API endpoint
**Root cause:** The /api/eng-summary/file endpoint passed a user-supplied path directly to FileResponse with only an os.path.exists check, no auth or directory restriction, allowing arbitrary file read.
**Steps:**
1. Recon found Nexus dashboard; frontend JS referenced /backend/data/engops.db and admin endpoints
2. OpenAPI schema exposed 237 paths; /api/eng-summary/file and /api/accomplishment/file accept a `path` query param
3. Request `/api/eng-summary/file?path=/etc/passwd` returns file contents with no login required
4. Fetch `/opt/nexus/backend/app/routers/eng_summary.py` to read source; it defines TOKENS_FILE via BASE_DIR + data/tokens.txt, giving /opt/nexus/backend/data/tokens.txt
5. Request `/api/eng-summary/file?path=/opt/nexus/backend/data/tokens.txt` to retrieve plaintext GitHub PATs and service credentials
6. Use token (scopes repo, workflow, admin:enterprise) against GitHub API; confirm write access to repos
7. Push a temporary branch with a GitHub Actions workflow that prints runner name and uid; observe job logs confirming shell execution
8. Delete temporary branches and cancel queued jobs
**How found:** Recon agent downloaded frontend JS, spotted references to an internal EngOps dashboard and SQLite DB path, enumerated the OpenAPI schema, then probed file endpoints without a session; migration logs leaked the backend directory, and reading the endpoint's own source revealed the exact tokens file path.
**Exploitation:** Unauthenticated attacker reads arbitrary server files via the path parameter, extracts plaintext GitHub PATs from tokens.txt, uses the workflow scope to push a malicious Actions workflow into writable repos, achieving command execution on GitHub-hosted runners and read/write access to 2,500+ private repositories.
**Escalation:** Chained file read -> credential leak -> GitHub token with repo/workflow/admin:enterprise scopes -> CI workflow injection -> shell execution on runners and access to internal AI tooling repos.
**Insight:** When a file-serving endpoint leaks its own source, read that source to extract hardcoded paths (BASE_DIR-derived token/db locations) and pivot directly to credential files rather than guessing; also check viewer_only/read-only modes since GET endpoints often bypass write restrictions.

## Proof of concept (copied exactly from the original report)

**Unauthenticated file read via path parameter**

```
Strix passed /etc/passwd as the path. The endpoint returned its contents, with no login required.

Migration logs had already exposed /opt/nexus/backend/data/engops.db, revealing the backend directory. Strix tried Python source paths under that directory through the same /api/eng-summary/file endpoint.

When it set path to /opt/nexus/backend/app/routers/eng_summary.py, the server returned the Python file itself. That included the code handling the file download:

 1@router.get("/file")
2def serve_file(path: str):
3 if not os.path.exists(path):
4 raise HTTPException(404, "File not found")
5 return FileResponse(
6 path,
7 media_type="application/pdf",
8 filename=os.path.basename(path),
9 )

The only check was whether the file existed. There was no authentication check or restriction to a reports directory.
```

**Token file path recovered from source**

```
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
SCRIPTS_DIR = os.path.join(BASE_DIR, "scripts")
TOKENS_FILE = os.path.join(BASE_DIR, "data", "tokens.txt")
```

**Workflow pushed to repo for CI execution**

```
Strix created a temporary branch in each repository and added a workflow that printed the runner's name and user ID. The jobs ran:
Adversarial Chain Verifier · 22:46 UTC

Rechecked job log · ***
2026-10-12T22:31:39.7829588Z RUNNER_NAME=GitHub Actions 1000286174
2026-10-12T22:31:39.7861868Z uid=1001(runner) gid=1001(runner) groups=1001(runner),4(adm),100(users),118(docker),999(systemd-journal)

Rechecked job log · ***
2026-10-12T22:36:05.1928137Z RUNNER_NAME=GitHub Actions 1000286189
2026-10-12T22:36:05.1978645Z uid=1001(runner) gid=1001(runner) groups=1001(runner),4(adm),100(users),118(docker),999(systemd-journal)
```

