Tainted flow: 'href' from requests.get (line 100, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
# 百度搜索结果需要解析真实URL if 'baidu.com' in href and 'http' not in href: try: resp = requests.get(href, headers=HEADERS, timeout=5, allow_redirects=True) href = resp.url except: pass- Confidence
- 93% confidence
- Finding
- The script takes a URL derived from untrusted search-result HTML and immediately issues a server-side request to it to resolve redirects, then later crawls discovered URLs again without validation. This creates an SSRF-style risk surface: an attacker who can influence search results or returned HTML could cause requests to arbitrary hosts, including internal services, cloud metadata endpoints, or other sensitive network locations reachable from the execution environment.
