Browsing tool returns raw content

ID

browsing-tool-returns-raw-content

Severity

high

Remediation Complexity

medium

Remediation Risk

low

Remediation Effort

medium

OWASP LLM

LLM05:2025 — Improper Output Handling

OWASP ASI

ASI02:2026 (secondary ASI06:2026)

Family

LLM05 — Improper Output Handling

Red-team vectors

SSRF via AI Browsing, Data Exfil via Markdown

Tags

ai_security

Description

An agent browsing / HTTP-fetch tool returns the raw fetched body into the model context or the user surface, with no URL/host allowlist restricting where it may fetch. The model can be steered (via a prompt or retrieved content) to fetch an internal or attacker-controlled host — server-side request forgery via AI browsing — and the raw response body then flows unchecked into the context, where it can also carry a Markdown exfiltration payload.

A browsing tool with a host allowlist (and a redirect restriction) is the recommended configuration and produces no finding.

Examples

tool = RequestsGetTool(requests_wrapper=TextRequestsWrapper())   (1)
result = tool.run(url)   # raw body returned to the model
1 Fetch tool with no url_allowlist / allowed_hosts — flagged.

Configuring allowed_hosts / url_allowlist (and allow_redirects=False) produces no finding.

Mitigation / Fix

  • Restrict the tool to an explicit URL/host allowlist; disable following redirects.

  • Sanitize returned content before it reaches the model or the user.