T09 · Insecure Skill Coding Practices
- Location
scripts/parsers/blog_rss.py:67- Finding
Server-Side Request Forgery Through Configurable RSS and Web Sources
- Content
View full analysis
Optional[str]: for attempt in range(self.RETRY_COUNT): try: response = self.session.get(url, timeout=self.TIMEOUT) response.raise_for_status() response.encoding = response.apparent_encoding or 'utf-8' return response.text ``` ```python url = source.get('url') if not url: continue items = parser.parse(url, source.get('name', '')) ``` ### Technical Analysis The RSS and web-news collectors accept URLs from source configuration and pass them directly to `requests.get` or `requests.Session.get`. They do not restrict URL schemes, destination hostnames, ports, resolved IP addresses, or redirect targets. The project contains a separate `safe_http.py` module with a domain allowlist, but the affected collectors bypass it. Moreover, `requests` follows redirects by default, so validating only the initial URL would not be sufficient. An attacker who can add or modify a source can cause the collector to issue requests from the host running the Skill. This can expose network resources that are inaccessible to the attacker directly, including: - Loopback services such as `127.0.0.1`. - Private network services. - Link-local and cloud metadata endpoints. - Administrative interfaces reachable from the collector. - Ser ...[truncated 1400 chars]- Remediation
View remediation
