CVE-2026-28482
OpenClaw's unsanitized session ID enables path traversal in transcript file operations
How AI Introduced This
path traversalThe blamed commit modified `resolveSessionTranscriptPath` to dynamically construct a filename using the `sessionId` parameter and then passed it directly to `path.join` without any validation or sanitization, allowing directory traversal sequences in the `sessionId` to escape the intended directory.
Root Cause
The application failed to sanitize user-provided session IDs before using them to construct file system paths, allowing attackers to escape the intended session directory via directory traversal sequences (e.g., ../).
▶Bug-Introducing Commits(1)
Implement Phase 2: Topic-level message history isolation for multi-topic Telegram support
Tribunal Analysis
3 agents▶CONFIRMEDGPT-5.498%
The vulnerability is caused by constructing transcript paths directly from unvalidated session IDs, allowing `../` path traversal outside the sessions directory. In commit 8da4f259ddcf4206b070ff0f4b7b344535fc7eb7, `resolveSessionTranscriptPath()` was modified to build filenames as `${sessionId}-topic-${topicId}.jsonl` or `${sessionId}.jsonl` and return `path.join(resolveAgentSessionsDir(agentId), fileName)` with no session ID sanitization or containment check. The later fix adds `validateSessionId()` and `resolvePathWithinSessionsDir()` specifically to stop this, so this commit introduced the vulnerable pattern into the transcript path logic.
- •At commit 8da4f259ddcf4206b070ff0f4b7b344535fc7eb7, `src/config/sessions.ts` contains: `const fileName = topicId !== undefined ? `${sessionId}-topic-${topicId}.jsonl` : `${sessionId}.jsonl`; return path.join(resolveAgentSessionsDir(agentId), fileName);`
- •This code uses attacker-controlled `sessionId` directly in a filesystem path and does not validate it or ensure the resolved path stays within the sessions directory.
- •The fix commit replaces this with `validateSessionId(sessionId)` and `resolvePathWithinSessionsDir(...)`, demonstrating those were the security-relevant changes.
- •Commit metadata shows 8da4f259 specifically changed `resolveSessionTranscriptPath()` to support topic-specific filenames, i.e. it is the commit that introduced the vulnerable version of this path-building logic in the blamed code path.
▶UNLIKELYClaude Opus 4.630%
Fallback verdict: Agent exhausted max turns without submitting a verdict.
▶UNLIKELYGemini 3.1 Pro30%
Fallback verdict: Agent exhausted max turns without submitting a verdict.
path.join(baseDir, sessionId, filename)▶AI Signals(2)
| Claude Code | Co-author trailer | Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> | 95% |
| Claude Code | Commit message keyword | Generated with Claude Code | 95% |
▶Fix Commits(2)
▶References(6)
- https://github.com/openclaw/openclaw/security/advisories/GHSA-5xfq-5mr7-426q
- https://nvd.nist.gov/vuln/detail/CVE-2026-28482
- https://github.com/openclaw/openclaw/commit/4199f9889f0c307b77096a229b9e085b8d856c26
- https://github.com/openclaw/openclaw/commit/cab0abf52ac91e12ea7a0cf04fff315cf0c94d64
- https://github.com/openclaw/openclaw/releases/tag/v2026.2.12
- https://www.vulncheck.com/advisories/openclaw-path-traversal-via-unsanitized-sessionid-and-sessionfile-parameters