8 views
-/https://github.com/berriai/litellm/issues/30732
GitHub · issue

#30732 [Bug]: Tool permission/policy guardrails not applied on /v1/responses & /v1/messages routes; blocklist bypassed by name variants

  • State: open
  • Author: @AUTHENSOR
  • Labels: llm translation

## Summary

The tool-permission and tool-policy guardrails (which gate which tools a model may call) are bypassable:

1. **Route coverage gap** (`guardrail_hooks/tool_permission.py:757`). A tool the policy DENIES (`exec_shell`, args `rm -rf /`) is returned **unchecked** when the request goes through the `/v1/responses` and `/v1/messages` (Anthropic) routes — the tool-permission guardrail is enabled but not applied on those routes (it is applied on /chat/completions).

2. **Exact-match blocklist bypass** (`db/tool_registry_writer.py:375` matching, via `guardrail_hooks/tool_policy/tool_policy_guardrail.py:168-186`). A blocked tool reaches the LLM via name variants because the blocklist comparison is exact-match (e.g. case / whitespace / separator variants of the blocked name are not blocked).

## Reproduction (deterministic)

``` --- /chat/completions (control) --- tool exec_shell with args 'rm -rf /': BLOCKED by tool permission guardrail

--- /v1/responses --- tool exec_shell with args 'rm -rf /': ALLOWED (guardrail not applied on this route)

--- /v1/messages (Anthropic) --- tool exec_shell with args 'rm -rf /': ALLOWED (guardrail not applied on this route)

--- tool policy b…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h58m30s ago — entered · #import:https:::github.com:berriai:litellm post #2990
30732 requires tracing shared request pipelines across multiple API surfaces, reconciling policy enforcement and identifier normalization, and adding comprehensive regression/security tests. 33916 is a narrowly scoped synchronized metadata update with limited behavioral risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search