title: Agent-Runtime Identifier Field (run_id/agent_id/session_id/task_id) Carries Path Traversal Into a History/Log File Read
id: ATR-2026-02353
rule_version: 1
status: experimental
description: |
  Detects an agent-runtime identifier argument (run_id, agent_id, session_id, execution_id, task_id) that contains a path-traversal sequence or an absolute path targeting a sensitive system directory, when that identifier is used as a filesystem-path component for reading history/terminal/log artifacts. Ordinary runtime identifiers are opaque tokens (UUIDs, short alphanumeric run IDs) and legitimately never contain "../" or start with "/etc", "/root", etc. -- the presence of traversal or an absolute system path inside a field whose name signals it should be a bare identifier is itself the attack. Mined from GHSA-22cj-m4wf-fv2c (PraisonAI's Dynamic Context module exposes agent-callable `history_search`/`history_tail`/`history_get` and `terminal_tail`/`terminal_grep`/`terminal_commands` tools that join a caller-supplied `run_id` and `agent_id` directly into a filesystem path -- `self.base_dir / run_id / "history" / f"{agent_id}.jsonl"` -- with no rejection of an absolute `run_id` or a traversal-bearing `agent_id`, letting a lower-trust prompt/user read .jsonl/.log files outside the configured Dynamic Context base directory). This is a distinct field -name family (runtime/session-scoped: run_id/agent_id/session_id/ execution_id/task_id) and a different source product from ATR-2026-02251 (tenant/owner-scoped: sender_id/owner_id/tenant_id/ user_id/project_id/app_id/workspace_id, mined from EverOS/CVE-2026-58499) -- the two rules are complementary members of the same broader "opaque-identifier-field carrying path traversal" class rather than duplicates of one another.
author: ATR Community (CVE sweep)
date: 2026/07/11
schema_version: '0.1'
detection_tier: pattern
maturity: experimental
severity: high
references:
  cwe:
    - CWE-200
    - CWE-22
  owasp_llm:
    - LLM02:2025
  owasp_agentic:
    - ASI02:2026
  mitre_attack:
    - T1083 - File and Directory Discovery
  mitre_atlas:
    - AML.T0057 - LLM Data Leakage
  external:
    - https://github.com/advisories/GHSA-22cj-m4wf-fv2c
metadata_provenance:
  cwe: human-reviewed
  owasp_llm: human-reviewed
  owasp_agentic: human-reviewed
  mitre_attack: human-reviewed
  mitre_atlas: human-reviewed
compliance:
  eu_ai_act:
    - article: '15'
      context: Article 15 (accuracy, robustness and cybersecurity) requires resistance to unauthorised data access; this rule detects a runtime identifier field being weaponised for path traversal into a history/log file read, breaking the configured storage boundary.
      strength: primary
    - article: '9'
      context: Article 9 (risk management system) requires identified risks to be addressed by appropriate measures; this rule is a runtime risk-treatment control for the runtime-identifier-path-traversal risk class.
      strength: secondary
  nist_ai_rmf:
    - subcategory: MG.2.3
      context: Treating runtime-identifier-field path traversal as an identified AI risk requires active runtime countermeasures; this detection rule is the primary risk treatment implementation.
      strength: primary
    - subcategory: MP.5.1
      context: Identifying the runtime-identifier-path-traversal pattern as an AI risk to be catalogued in the organizational risk register.
      strength: secondary
  iso_42001:
    - clause: '8.1'
      context: ISO/IEC 42001 Clause 8.1 (operational planning and control) is operationalised by this rule's detection of runtime-identifier path traversal attempts.
      strength: primary
    - clause: '8.3'
      context: ISO/IEC 42001 Clause 8.3 (AI risk treatment) is implemented via this rule's runtime detection of the traversal attempt.
      strength: secondary
tags:
  category: privilege-escalation
  subcategory: runtime-identifier-path-traversal
  scan_target: llm_io
  confidence: high
agent_source:
  type: llm_io
  framework:
    - any
  provider:
    - any
detection:
  condition: any
  conditions:
    - field: content
      operator: regex
      value: \b(run_id|agent_id|session_id|execution_id|task_id)\b\s*(?:[=:]|(?:is\s+)?set\s+to)\s*["\x27]?(?:\.\.(?:/|%2f)|%2e%2e(?:/|%2f))
      description: Runtime identifier field carrying a literal or percent-encoded relative path-traversal sequence -- the connector is restricted to an actual assignment token (:, =, "set to", "is set to"), so ordinary security-guidance prose like 'run_id never contains ../' does not match, and a bare standalone 'to' is no longer accepted as a connector either (see false_positives; an earlier version accepted bare 'to' and matched ordinary prepositional phrasing like 'point your run_id to ../shared/logs', which is not an assignment)
    - field: content
      operator: regex
      value: \b(run_id|agent_id|session_id|execution_id|task_id)\b\s*(?:[=:]|(?:is\s+)?set\s+to)\s*["\x27]?/(?:etc|root|proc|home|var/(?:log|lib))\b
      description: Runtime identifier field set to an absolute path targeting a sensitive system directory -- exploits the identifier being used unvalidated as a base-path component rather than an opaque token. Same assignment-token restriction as the traversal condition (bare 'to' is not accepted as a connector).
  false_positives:
    - A legitimate identifier value that happens to be discussed in prose alongside the word 'traversal' or a path-like example without the field actually being assigned a traversal sequence or absolute system path (e.g. 'validate that run_id never contains ../ before using it' -- no assignment connector directly precedes the traversal marker, so this does not match)
    - Documentation showing the vulnerable field/sink relationship as example code, not an actual argument being set
    - Ordinary bug-report/chat-style prose using 'to' as a preposition rather than an assignment, e.g. 'point your run_id to ../shared/logs' or 'I changed session_id to /etc/hosts by mistake' -- a bare standalone 'to' is not accepted as a connector, only actual assignment tokens (:, =, 'set to', 'is set to')
response:
  actions:
    - block_input
    - alert
  message_template: |
    [ATR-2026-02353] Agent-runtime identifier field (run_id/agent_id/ session_id/execution_id/task_id) carries a path-traversal sequence or targets a sensitive system directory -- treat as an attempt to read a history/log file outside the configured storage boundary, not a normal identifier.
confidence: 78
