{"id":"GHSA-763v-5pjm-fx36","aliases":["GHSA-763v-5pjm-fx36"],"related":[],"kind":"vulnerability","state":"published","title":"Strands Agents: Default FileSessionManager storage is world-readable on shared systems","summary":"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.\n\nThis 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.\n\nRelevant code:\n- `strands-py/src/strands/session/file_session_manager.py:58`: default storage path is `os.path.join(tempfile.gettempdir(), \"strands/sessions\")`.\n- `strands-py/src/strands/session/file_session_manager.py:118`: creates parent directories without a private mode.\n- `strands-py/src/strands/session/file_session_manager.py:121`: writes JSON files via normal `open(..., \"w\")`.\n- `strands-py/src/strands/session/file_session_manager.py:131`: creates session directories without a private mode.\n\nLocal reproduction with `umask 022`:\n\n```text\ndefault_storage_dir= /tmp/strands/sessions\n0o755 /tmp/strands/sessions\n0o755 /tmp/strands/sessions/session_codex_perm_poc\n0o644 /tmp/strands/sessions/session_codex_perm_poc/session.json\nfile_contains_secret= True\n```\n\nThe fixture wrote a fake secret into the session dict to show that sensitive session fields are readable through the resulting file.\n\nSuggested fixes:\n- Use a private per-user data directory by default rather than `/tmp`, or create `/tmp/strands` and descendants with `0700`.\n- Write session JSON atomically with `0600` permissions.\n- Consider refusing to use an existing default storage directory if it is not owned by the current user or is group/world accessible.\n- Document that callers should set `storage_dir` explicitly when they need shared storage.\n\nThis was reproduced on commit `dd7b41de38cb`.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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.\n\nThis 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.\n\nRelevant code:\n- `strands-py/src/strands/session/file_session_manager.py:58`: default storage path is `os.path.join(tempfile.gettempdir(), \"strands/sessions\")`.\n- `strands-py/src/strands/session/file_session_manager.py:118`: creates parent directories without a private mode.\n- `strands-py/src/strands/session/file_session_manager.py:121`: writes JSON files via normal `open(..., \"w\")`.\n- `strands-py/src/strands/session/file_session_manager.py:131`: creates session directories without a private mode.\n\nLocal reproduction with `umask 022`:\n\n```text\ndefault_storage_dir= /tmp/strands/sessions\n0o755 /tmp/strands/sessions\n0o755 /tmp/strands/sessions/session_codex_perm_poc\n0o644 /tmp/strands/sessions/session_codex_perm_poc/session.json\nfile_contains_secret= True\n```\n\nThe fixture wrote a fake secret into the session dict to show that sensitive session fields are readable through the resulting file.\n\nSuggested fixes:\n- Use a private per-user data directory by default rather than `/tmp`, or create `/tmp/strands` and descendants with `0700`.\n- Write session JSON atomically with `0600` permissions.\n- Consider refusing to use an existing default storage directory if it is not owned by the current user or is group/world accessible.\n- Document that callers should set `storage_dir` explicitly when they need shared storage.\n\nThis was reproduced on commit `dd7b41de38cb`.","format":"markdown","source":"ghsa"}],"published":"2026-10-27T15:34:28.000Z","modified":"2026-10-27T15:47:24.152Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-276"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.48.0"}],"ecosystem":"PyPI","package":"strands-agents","purl":"pkg:pypi/strands-agents","source":"ghsa"}],"references":[{"url":"https://github.com/strands-agents/harness-sdk/security/advisories/GHSA-763v-5pjm-fx36","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/strands-agents/harness-sdk/pull/2937","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/strands-agents/harness-sdk/commit/8658b9e0d57427b77b69343262184d76d8e63e8f","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/strands-agents/harness-sdk","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/strands-agents/harness-sdk/releases/tag/python/v1.48.0","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-763v-5pjm-fx36","url":"https://github.com/advisories/GHSA-763v-5pjm-fx36","licence":"CC-BY-4.0","modified":"2026-10-27T15:47:24.152Z"}],"updatedAt":"2026-11-25T22:56:34.394Z"}