| 标题 | louisho5 picobot 0.2.0 Server-Side Request Forgery (SSRF) (CWE-918) |
|---|
| 描述 | # Technical Details
A Server-Side Request Forgery vulnerability exists in the `[WebTool.Execute]` method in `internal/agent/tools/web.go` of picobot.
The application fails to restrict model-controlled URLs targeting localhost or internal-network resources. `WebTool.Execute()` accepts the `url` argument, builds an HTTP request, and dispatches it with `http.DefaultClient.Do(req)` without hostname policy, loopback/RFC1918 rejection, redirect revalidation, or DNS pinning.
# Vulnerable Code
File: `internal/agent/tools/web.go`
Method: `WebTool.Execute`
Why: The tool is default-enabled in `internal/agent/loop.go` and directly performs outbound HTTP GET requests on provider-returned URLs with no SSRF safeguards.
# Reproduction
1. Run the supplied harness and verification script from the Picobot repository root.
2. Have the local provider return a `web` tool call for `http://127.0.0.1:<port>/internal.txt`.
3. Confirm the canary content from `/internal.txt` appears in the tool transcript and the logs show the localhost fetch.
# Impact
- Allows the agent host to probe and retrieve localhost or private-network HTTP resources.
- Leaks internal response bodies into the model/tool transcript. |
|---|
| 来源 | ⚠️ https://github.com/louisho5/picobot/issues/41 |
|---|
| 用户 | Eric-h (UID 97582) |
|---|
| 提交 | 2026-06-11 11時27分 (1 月前) |
|---|
| 管理 | 2026-07-13 23時12分 (1 month later) |
|---|
| 状态 | 已接受 |
|---|
| VulDB条目 | 378162 [louisho5 picobot 直到 0.2.0 web Tool web.go WebTool.Execute url 权限提升] |
|---|
| 积分 | 20 |
|---|