Strands Agents: Local Privilege Escalation via Symlink Attack in Default Session File Storage
GHSA-3w55-933p-8pv5 · published 2026-10-27
- Severity
- High
- CVSS score
- 7.1
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 1.48.0
Arbitrary file overwrite — local attacker can write attacker-controlled content to any file writable by the victim process Local privilege escalation — via overwriting shell configs, SSH keys, cron jobs, or systemd user services Persistent agent compromise — via session data injection, the agent follows attacker instructions indefinitely
Upgrade strands-agents to 1.48.0 or later.
1. Use a user-private default directory — ~/.strands/sessions/ or $XDG_DATA_HOME/strands/sessions/ instead of /tmp/ 2. Use os.open() with O_NOFOLLOW | O_CREAT | O_WRONLY — refuses to follow symlinks 3. Use tempfile.mkstemp() for atomic writes instead of predictable .tmp suffix 4. Verify directory ownership matches the current user before writing 5. Add optional integrity verification (HMAC) on session files to detect tampering
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| strands-agents | PyPI | < 1.48.0 | 1.48.0 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- CriticalMCP Toolbox HTTP tool path parameters allow traversal to unintended endpointsgithub.com/googleapis/mcp-toolbox
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.