| 제목 | zhayujie CowAgent 2.1.1 Server-Side Request Forgery (CWE-918) |
|---|
| 설명 | # Technical Details
A Server-Side Request Forgery exists in the `WebFetch.execute` method in `agent/tools/web_fetch/web_fetch.py` of CowAgent.
The application fails to validate the resolved destination host or IP for attacker-influenced `http` and `https` URLs. It only enforces a scheme check, then performs `requests.get(..., allow_redirects=True)`, which allows access to special-use, loopback, private, or internal HTTP destinations.
# Vulnerable Code
File: agent/tools/web_fetch/web_fetch.py
Method: WebFetch.execute
Why: The code checks `parsed.scheme` but does not block dangerous destinations before calling `requests.get` in both the webpage fetch path and document download path.
# Reproduction
1. Download the integration PoC `verification_test.py` and the control script `control-blocked-scheme.py` from the issue-linked gists.
2. From the repository root, run `python3 verification_test.py`.
3. Observe the PoC reports `DEFECT-CONFIRMED-WITH-LIMITATIONS` and logs an outbound request toward `http://x.x.x.x:18080/special-use`; then run `python3 control-blocked-scheme.py` and observe that `file:///etc/passwd` is rejected only because of the scheme check.
# Impact
- An attacker who can influence tool arguments can force server-side HTTP requests to internal or special-use destinations.
- This can expose internal services, metadata-style endpoints, development interfaces, and redirect-based pivots reachable from the CowAgent host. |
|---|
| 원천 | ⚠️ https://github.com/zhayujie/CowAgent/issues/2889 |
|---|
| 사용자 | Eric-x (UID 94869) |
|---|
| 제출 | 2026. 06. 13. AM 05:05 (1 월 ago) |
|---|
| 모더레이션 | 2026. 07. 18. AM 04:37 (1 month later) |
|---|
| 상태 | 수락 |
|---|
| VulDB 항목 | 380009 [zhayujie CowAgent 까지 2.1.1 web_fetch.py WebFetch.execute url 권한 상승] |
|---|
| 포인트들 | 20 |
|---|