Skip to content

fix: Port tool confirmation security and re-validation fixes to v1 - #6575

Merged
wukath merged 2 commits into
v1from
backport-tool-confirmation-fixes-v1
Aug 5, 2026
Merged

fix: Port tool confirmation security and re-validation fixes to v1#6575
wukath merged 2 commits into
v1from
backport-tool-confirmation-fixes-v1

Conversation

@wukath

@wukath wukath commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

This PR ports two tool confirmation fixes to the v1 branch:

  1. fix: Prevent continuation forgery in tool confirmation (PiperOrigin-RevId: 953540969)

    • Validates that target tools are registered in the executing agent's tools_dict.
    • Validates that the tool requires confirmation (static definition or dynamic request).
    • Verifies original tool call event exists in session history with matching ID, name, and arguments.
  2. fix: Stop re-validating already-consumed tool confirmations (PiperOrigin-RevId: 956611754)

    • Drops tool confirmations that have already been acted on prior to running strict target resolution.
    • Prevents dynamic tool confirmations from re-validating on subsequent LLM steps within the turn.

@adk-bot adk-bot added the tools [Component] This issue is related to tools label Aug 3, 2026
Comment thread src/google/adk/tools/tool_confirmation.py Outdated
An attacker who could manipulate or inject events into the session history could execute unauthorized tools by forging a tool confirmation response. This fixes the vulnerability by:
- When resolving confirmation targets, the processor verifies if the tool is registered in the executing agent's tools_dict
- Validate that the tool actually requires confirmation, supporting both static definitions and dynamic confirmation requests
- Verify that the original tool call event exists in the session history with the matching ID, and that its name and arguments match the confirmation request's originalFunctionCall exactly to prevent argument tampering.

Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 953540969
Change-Id: Iff6e8c861605fafafce4985ee9a269274d6d789c
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 956611754
@wukath
wukath force-pushed the backport-tool-confirmation-fixes-v1 branch from 4df0ee1 to 7801db0 Compare August 5, 2026 18:48
@wukath
wukath merged commit 4783364 into v1 Aug 5, 2026
14 checks passed
@wuliang229
wuliang229 deleted the backport-tool-confirmation-fixes-v1 branch August 7, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants