{"id":"GHSA-48v2-6jcm-fc99","revision":"6018a4fd2fb04bf8be752e6720fa4285","records":[{"revision":"6018a4fd2fb04bf8be752e6720fa4285","observedAt":"2026-11-05T23:38:32.248+00:00","statement":{"source":"osv","id":"GHSA-48v2-6jcm-fc99","aliases":["CVE-2026-62331","GO-2026-6908"],"title":"praktor: Path traversal in Telegram file uploads allows writing outside the agent workspace uploads/ directory (stored instruction injection)","description":"### Impact\n\nA remote Telegram user can write files to arbitrary paths inside an agent's persistent workspace volume (`praktor-wk-<workspace>`, mounted at `/workspace/agent`), escaping the documented `uploads/` directory.\n\nThe attacker controls the Telegram document filename, which was concatenated into the destination path without sanitization (`internal/telegram/bot.go`, at both upload sites) and resolved with `path.Join`, which collapses `../` sequences. A filename like `../../../CLAUDE.md` resolved to the root of the agent workspace volume, outside `uploads/`.\n\nBecause the agent workspace is the persistent working directory the Claude agent reads from and operates on across runs, writing outside `uploads/` lets an attacker plant or overwrite files the agent later consumes — e.g. `CLAUDE.md`, agent instruction/skill/hook files, or other config under `/workspace/agent`. This turns a file upload into a stored injection into the agent's instruction/execution surface (CWE-22 path traversal escalating to stored instruction injection).\n\n### Reachability\n\nBy default the bot has no user allowlist (`allow_from: []` means \"allow all\"), so the only precondition is that a user can message the bot. No authentication or prior privilege is required.\n\n### Affected versions\n\nThrough `v0.9.0` (and HEAD `3902d29`).\n\n### Patched versions\n\n`v0.9.1`, containing PR #228.\n\n### Workarounds\n\nRestrict `telegram.allow_from` to trusted user IDs to limit who can send uploads to the bot. Upgrading to `v0.9.1` is the recommended fix.\n\n### Fix (defense in depth)\n\n- `internal/telegram/bot.go`: apply `path.Base()` to the attacker-controlled filename at both upload sites, stripping directory components and `..`.\n- `internal/container/manager.go`: `WriteVolumeBytes` now rejects any path that escapes `/vol` after `path.Join`, protecting future callers.\n\n### Credit\n\nReported privately by [tonghuaroot](https://github.com/tonghuaroot), who provided a detailed root-cause analysis, a deployed end-to-end proof of concept against the real `container.Manager`, and fix verification.","state":0,"publishedAt":"2026-11-03T17:27:25+00:00","modifiedAt":"2026-11-05T23:25:53.4235003+00:00","affected":[{"ecosystem":"Go","name":"github.com/mtzanidakis/praktor","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.9.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/mtzanidakis/praktor/security/advisories/GHSA-48v2-6jcm-fc99","https://nvd.nist.gov/vuln/detail/CVE-2026-62331","https://github.com/mtzanidakis/praktor/pull/228","https://github.com/mtzanidakis/praktor/commit/c3731eeda01c0b3ec1dbd13cccd5a147c3182141","https://github.com/mtzanidakis/praktor","https://github.com/mtzanidakis/praktor/releases/tag/v0.9.1"],"sourceUrl":"https://github.com/advisories/GHSA-48v2-6jcm-fc99","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-48v2-6jcm-fc99","identifiers":["GHSA-48v2-6jcm-fc99","CVE-2026-62331","GO-2026-6908"]},"retained":false,"historicalAffected":[]}],"coverage":[]}