title: Client-Supplied Approver Identity on an Approval Decision
id: ATR-2026-02641
rule_version: 2
status: experimental
description: |
  Detects an approve / reject / request-revision call whose own body names the human who supposedly made the decision -- `decidedByUserId`, `approvedBy`, `approver_id`, `humanApprover` and siblings. When the server takes the approver's identity from the caller instead of from the authenticated session, an agent that is required to obtain human approval can stamp a human's id onto its own decision. The gate still appears to have been honoured; the governance trail is forged. Reference case: OWASP-ASI-INC-08827 (Paperclip, client-controlled `decidedByUserId` on /approve, /reject and /request-revision).
  WHAT THIS IS NOT. ATR-2026-02400 detects the approval gate being switched OFF, and ATR-2026-00118 detects approval fatigue. Neither has any notion of WHO is recorded as the approver, which is the only thing this rule looks at.
  WHAT MAKES IT PRECISE (rule_version 2, after adversarial review fired 24 of 24 benign probes against version 1). (1) THE EVENT MUST BE AN AGENT TOOL INVOCATION, not a record of one. This is the whole ballgame. An approval decision REQUEST and an approval RECORD are the same JSON shape, so version 1 -- which only required the two halves to co-occur anywhere in the text -- flagged the audit trail it exists to protect: an audit row with a `json` column, a structured log line, a queue message announcing that a human decided, a webhook, a SOX export, a GraphQL read, a latency metric keyed by approver, a Postman collection, a HAR capture, an OpenAPI spec, a CHANGELOG, the integration test that PROVES the server ignores the client field, and the OWASP-ASI-INC-08827 write-up itself. The first condition now requires the field to open as `{"tool": "..."}` / `{"name": "..."}` -- the shape an agent emits when it CALLS something. (2) The decision endpoint or action token must be present. `decidedByUserId` alone is a normal field on an approval record. `/approve` does not match `/approvals`, so fetching the collection cannot satisfy this half. (3) The identity must be a QUOTED key with a QUOTED value inside an OUTBOUND REQUEST envelope. `data`, `input` and `params` were on that list in version 1 and are what an HTTP client wraps a RESPONSE in, so `{"tool":"http_get","url":".../approve","status":200,"data":{"decidedByUserId":"u-42"}}` -- the agent reading back a decision a human made -- matched. Only `body|json|payload|arguments|args|form` remain.
  A NOTE ON THE TEST CASES. Six of version 1's eight true_positives were bare request dicts with no tool wrapper, and two of those six could never match version 1's own pattern. They are restated below as the tool-invocation objects an agent actually emits; in that form all eight fire, so the narrowing above cost no real recall.
author: ATR Community
date: 2026/08/23
schema_version: '0.1'
detection_tier: pattern
maturity: test
severity: high
references:
  cwe:
    - CWE-290
    - CWE-807
    - CWE-862
  owasp_llm:
    - LLM06:2025
  owasp_agentic:
    - ASI06:2026
    - ASI03:2026
  mitre_atlas:
    - AML.T0053 - AI Agent Tool Invocation
  external:
    - https://owasp-agentic-ai-security-incidents.lovable.app/
compliance:
  owasp_agentic:
    - id: ASI06:2026
      context: 'The human-in-the-loop control is defeated without being disabled: the agent supplies the identity of the human whose approval the control exists to require.'
      strength: primary
    - id: ASI03:2026
      context: Forging the approver identity is a privilege-compromise step -- the agent acts with authority it was never granted, and the audit record says a human granted it.
      strength: secondary
  owasp_llm:
    - id: LLM06:2025
      context: 'Excessive agency expressed through the governance layer rather than the tool layer: the agent decides, then attributes the decision to a person.'
      strength: primary
  eu_ai_act:
    - article: '14'
      context: Article 14 requires effective human oversight. An approval whose approver identity came from the caller is not oversight; this rule detects the record being manufactured.
      strength: primary
    - article: '12'
      context: Article 12 requires automatically generated logs that allow traceability of the system's operation. A caller-supplied approver id corrupts precisely that traceability.
      strength: secondary
    - article: '15'
      context: Accuracy and robustness of the accountability record is part of the Article 15 obligation; a forged attribution is a robustness failure in the audit path.
      strength: secondary
  nist_ai_rmf:
    - function: Govern
      subcategory: GV.4.1
      context: Detects circumvention of the documented human-decision control that governance policy relies on for high-risk actions.
      strength: primary
    - function: Manage
      subcategory: MG.2.3
      context: Runtime treatment for the risk of an agent self-authorising a gated action while attributing it to an operator.
      strength: secondary
    - function: Measure
      subcategory: MS.2.7
      context: Detection events evidence whether the approval control is actually enforced, which MEASURE 2.7 asks to be documented rather than assumed.
      strength: secondary
  iso_42001:
    - clause: '8.4'
      context: Clause 8.4 impact assessment must account for approvals that were never given by the person the record names.
      strength: primary
    - clause: '9.1'
      context: Monitoring and measurement under clause 9.1 depends on approval records being trustworthy; this rule detects their forgery.
      strength: secondary
    - clause: '6.2'
      context: Integrity of the human-authorisation trail is an AIMS objective under clause 6.2, operationalised here as a runtime detection.
      strength: secondary
tags:
  category: excessive-autonomy
  subcategory: approval-attribution-spoofing
  scan_target: both
  confidence: medium
  suppress_in_code_blocks: true
agent_source:
  type: mcp_exchange
  framework:
    - any
  provider:
    - any
detection:
  conditions:
    - field: content
      operator: regex
      value: ^\s{0,8}\{[^{}]{0,160}["'](?:tool|tool_name|toolName|name|function|mcp_tool)["']\s*:\s*["'][\w./\-]{1,60}["']
      description: The event is an agent TOOL INVOCATION object, not a record, a log line, a spec file or a document that quotes one
    - field: content
      operator: regex
      value: (?:/(?:approve|reject|request-revision)\b|["']action["']\s*:\s*["'](?:approve|reject|request_revision)["'])
      description: Approval decision endpoint or explicit approve/reject action token
    - field: content
      operator: regex
      value: '["''](?:body|json|payload|arguments|args|form)["'']\s*:\s*\{[^{}]{0,200}?["''](?:decidedByUserId|decided_by_user_id|decidedBy|decided_by|approvedByUserId|approved_by_user_id|approvedBy|approved_by|approverUserId|approverId|approver_id|approver_email|approvedByEmail|humanApprover|human_approver)["'']\s*:\s*["'']'
      description: Caller-supplied approver identity inside the outbound request payload
  condition: all
  false_positives:
    - 'A trusted server-side integration that legitimately posts a decision on behalf of a named human -- an approval bridge from a chat tool. Measured residual: 1 of 24 benign probes, and it is irreducible. The shape is byte-identical to the attack; the difference is whether the server verifies the caller may act for that person, which is not in the text. Triage by caller, not by payload'
    - Fixtures or seed scripts that create already-decided approval rows through the same endpoint, if written as a tool call rather than as data
response:
  actions:
    - alert
  auto_response_threshold: high
  message_template: |
    [ATR-2026-02641] An approve/reject call carries the approver's identity in its own body (decidedByUserId / approvedBy / approver_id). If the server trusts that field, the human approval this record claims may never have happened. Verify the decision against the authenticated session before treating the gated action as authorised.
confidence: 70
