Default session storage is world-readable in Strands Agents
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
The default FileSessionManager storage in strands-agents writes session data under /tmp/strands/sessions and relies on the process umask for permissions, so session directories and JSON files can be world-readable. On systems with a common umask of 022, other local users can read persisted agent session data, which may include prompts, model output, tool inputs and outputs, and secrets. The weakness is classified as CWE-276, Incorrect Default Permissions.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the GitHub advisory
There is a local confidentiality issue in the default `FileSessionManager` storage behavior. By default it writes session data under `/tmp/strands/sessions` and relies on the process umask for directory and file permissions. On systems using the common `umask 022`, the session directories are `0755` and JSON files are `0644`, so other local users can read persisted agent session data. This matters on shared developer machines, CI hosts, notebooks, jump boxes, and multi-user GPU servers. Session storage is intended to persist conversation/history/state, so it can contain prompts, model output, tool inputs/outputs, intermediate state, and secrets that pass through the agent. Relevant code: - `strands-py/src/strands/session/file_session_manager.py:58`: default storage path is `os.path.join(tempfile.gettempdir(), "strands/sessions")`. - `strands-py/src/strands/session/file_session_manager.py:118`: creates parent directories without a private mode. - `strands-py/src/strands/session/file_session_manager.py:121`: writes JSON files via normal `open(..., "w")`. - `strands-py/src/strands/session/file_session_manager.py:131`: creates session directories without a private mode. Local reproduction with `umask 022`: ```text default_storage_dir= /tmp/strands/sessions 0o755 /tmp/strands/sessions 0o755 /tmp/strands/sessions/session_codex_perm_poc 0o644 /tmp/strands/sessions/session_codex_perm_poc/session.json file_contains_secret= True ``` The fixture wrote a fake secret into the session dict to show that sensitive session fields are readable through the resulting file. Suggested fixes: - Use a private per-user data directory by default rather than `/tmp`, or create `/tmp/strands` and descendants with `0700`. - Write session JSON atomically with `0600` permissions. - Consider refusing to use an existing default storage directory if it is not owned by the current user or is group/world accessible. - Document that callers should set `storage_dir` explicitly when they need shared storage. This was reproduced on commit `dd7b41de38cb`.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | strands-agents (PyPI) | before 1.48.0 | 1.48.0 | Patch available | GHSA-763v-5pjm-fx36 |
- strands-agents (PyPI) Vendor— Affected before 1.48.0 Fixed in 1.48.0 Patch available GHSA-763v-5pjm-fx36
Remediation
Upgrade strands-agents to version 1.48.0 or later, where the affected versions from 0 before 1.48.0 are fixed. Set storage_dir explicitly to a private directory on shared systems.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · GHSA-763v-5pjm-fx36 strands-agents (PyPI) Fixed in 1.48.0 Advisory →
Timeline
- 2026-10-27 Threatist record created from GHSA-763v-5pjm-fx36
References
Other 5
- https://github.com/strands-agents/harness-sdk/security/advisories/GHSA-763v-5pjm-fx36
- https://github.com/strands-agents/harness-sdk/pull/2937
- https://github.com/strands-agents/harness-sdk/commit/8658b9e0d57427b77b69343262184d76d8e63e8f
- https://github.com/strands-agents/harness-sdk
- https://github.com/strands-agents/harness-sdk/releases/tag/python/v1.48.0
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences