T09 · Insecure Skill Coding Practices
- Location
SKILL.md:33- Finding
Plaintext HTTP Used for Sensitive Public IP and Geolocation Lookup
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 33–34 and 54
Vulnerability Type: Plaintext transmission of IP address and geolocation data
Risk Level: MediumVulnerable code snippets:
text 接口地址:`http://ip-api.com/json/` (备选 `https://ipapi.co/json/` 有 Cloudflare 反爬限制,优先用 ip-api.com)text 2. 调用 `http://ip-api.com/json/` 获取完整网络信息Technical Analysis
The skill explicitly requires the Agent to use
http://ip-api.com/json/as its preferred endpoint. Because this request uses unencrypted HTTP, it provides neither transport confidentiality nor authenticated response integrity.The remote service receives the originating public IP implicitly through the network connection and returns sensitive network-location information, including the public IP, country, region, city, ISP, organization, coordinates, and timezone. A party capable of observing or modifying traffic between the Agent and the endpoint—such as a malicious Wi-Fi operator, compromised router, proxy, ISP-level intermediary, or other on-path attacker—can inspect or alter the response.
The Agent is instructed to format the response and report it directly to the user. Therefore, a modified response may be presented as trustworthy network information without integrity verification. No response authentication, schema validation, redirect restriction, or independent verification is specified.
Attack Path
- A user asks the Agent to report the current public IP address or network location.
- The skill directs the Agent to send a request to
http://ip-api.com/json/. - An on-path attacker intercepts the unencrypted HTTP request and response.
- The attacker observes the returned IP and geolocation details or replaces the response with attacker-controlled JSON.
- The Agent accepts the modified response and presents forged IP, location, ISP, coordinates, or timezone information to the user.
- The user may rely on this ...[truncated 914 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the plaintext endpoint with an HTTPS-only IP-geolocation provider.
- Remove the instruction that prioritizes
http://ip-api.com/json/; never fall back from HTTPS to HTTP. - Require normal TLS certificate and hostname validation.
- Reject redirects from HTTPS endpoints to HTTP destinations.
- Apply strict connection and response timeouts and impose a maximum response size.
- Validate the response against an allowlisted schema before presenting it:
- Confirm that the IP field contains a valid IPv4 or IPv6 address.
- Require expected primitive types for location and provider fields.
- Reject unexpected nested objects or malformed coordinate values.
- Treat remote values as untrusted data and avoid interpreting returned strings as Agent instructions or executable content.
- Fail closed with a clear error message when secure transport or response validation fails.
- If the selected provider does not support HTTPS for the required free endpoint, use a different provider that does rather than accepting plaintext transport.
