# Strands Agents local privilege escalation via symlink attack in session file storage

Source: https://junglewise.ai/threats/strands-agents-local-privilege-escalation-via-symlink-attack-in-default-b1795e5e  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-27. Updated: 2026-10-27  
License: CC BY 4.0 with a link back

Severity: high · CVSS 7.1 · Published 2026-10-27

Strands Agents is a Python SDK for building AI agents. A local attacker can exploit predictable session file storage in a world-writable directory to create symlinks that cause the application to overwrite arbitrary files or inject malicious session data, leading to code execution or persistent compromise of the agent's behavior.

Technologies: [strands-agents (PyPI)](https://junglewise.ai/threats/technologies/strands-agents). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 7.1, published 27 October 2026.

**Which products and versions are affected?** strands-agents (PyPI) < 1.48.0, ECOSYSTEM:introduced=0,fixed=1.48.0; Strands Agents versions prior to fix.

**Is there a fix for This vulnerability?** Yes. strands-agents (PyPI): upgrade to 1.48.0 or later. Until then: Move session storage to a user-private directory such as ~/.strands/sessions/ or $XDG_DATA_HOME/strands/sessions/ instead of /tmp/; use os.open() with O_NOFOLLOW and O_CREAT flags to prevent symlink following during file writes.</anigation>
<parameter name="timeline">[{"kind": "disclosed", "at": "2026-10-27"}] Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked with local access.

**Am I affected?** Check whether you run strands-agents (PyPI) or Strands Agents at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- strands-agents (PyPI): upgrade to 1.48.0 or later

  ```sh
  pip install "strands-agents>=1.48.0"
  ```


Move session storage to a user-private directory such as ~/.strands/sessions/ or $XDG_DATA_HOME/strands/sessions/ instead of /tmp/; use os.open() with O_NOFOLLOW and O_CREAT flags to prevent symlink following during file writes.</anigation>
<parameter name="timeline">[{"kind": "disclosed", "at": "2026-10-27"}]

## Technical details

The FileSessionManager component stores session data in /tmp/strands/sessions/ with predictable file paths using a write-then-replace pattern (open(path + ".tmp", "w") → os.replace()) that follows symlinks. An attacker can pre-place a symlink at the .tmp path to redirect writes to arbitrary files, or inject malicious JSON into session directories to achieve persistent prompt injection without integrity checks. The vulnerability requires local filesystem access but no special privileges or user interaction.

## Affected products

- Strands Agents versions prior to fix

## Related threats

- [Strands Agents FileSessionManager world-readable storage](https://junglewise.ai/threats/strands-agents-default-filesessionmanager-storage-is-world-readable-on-a14945e0)
- [Strands Agents SDK: Exposure of data element to wrong session in the A2A Server](https://junglewise.ai/threats/cve-2026-115419-unintended-disclosure-of-data-element-to-wrong-session-in)
