PyPI
GHSA-3w55-933p-8pv5
Strands Agents: Local Privilege Escalation via Symlink Attack in Default Session File Storage
- Severity
- High 7.1
- Published
- 27 Oct 2026
- Last changed
- 27 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.48.0
- Weakness
- Link following (CWE-59)
- Attack
- Needs local access · Needs a user account · No user action needed
- Attacker can
- Change data · Take it down
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H- Sources
- OSV.dev and GitHub
Description
The FileSessionManager defaults to storing session data in /tmp/strands/sessions/ (a world-writable directory) using predictable file paths and a write pattern (open(path + ".tmp", "w") → os.replace()) that follows symbolic links. A local attacker can exploit this to overwrite arbitrary files or inject malicious session data for persistent prompt injection.
Component: strands-py/src/strands/session/file_session_manager.py
- Default storage directory is tempfile.gettempdir() + "/strands/sessions/" (line 58) — resolves to /tmp/strands/sessions/ on Linux/macOS
- The _write_file() method (lines 116-123) writes to a predictable .tmp path without symlink protection:
- open() follows symlinks — a pre-placed symlink at the .tmp path causes writes to an arbitrary target file
- No integrity verification (HMAC/signature) on session files — tampered data is loaded as-is
Affected software
| Software | Affected versions |
|---|---|
strands-agentsPyPI · osv:PyPI:strands-agents |
|
About strands-agents
- Weekly downloads (PyPI)
- 9,148,188PyPI Stats, 24 Nov 2026
Vulnerabilities in strands-agents
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- GHSA-763v-5pjm-fx36Strands Agents: Default FileSessionManager storage is world-readable on shared systemsMedium 27 Oct 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-3w55-933p-8pv5