T09 · Insecure Skill Coding Practices
Note
- Location
- SKILL.md:14
- Finding
- Unencrypted HTTP Transport for ISS Location Data## Vulnerability Details **File Location**: `SKILL.md`, line 14 **Vulnerability Type**: Plaintext external API communication **Risk Level**: Low ### Complete Code Snippet ```bash curl -s "http://api.open-notify.org/iss-now.json" | jq -r '"Lat: \(.iss_position.latitude), Lon: \(.iss_position.longitude)"' ``` ### Technical Analysis The skill retrieves ISS position data over unencrypted HTTP. HTTP provides neither transport confidentiality nor server authenticity and does not protect response integrity. An attacker with a suitable network position could intercept the connection and replace the API response with attacker-controlled JSON. The response is only parsed and displayed by `jq`; it is not evaluated as shell code. Therefore, the demonstrated issue enables data manipulation rather than arbitrary command execution. The request also omits options such as `--fail` and `--show-error`, reducing the reliability with which transport and HTTP failures are detected. ### Attack Path 1. A user invokes the documented ISS-location command. 2. `curl` sends an unencrypted HTTP request to `api.open-notify.org`. 3. A network-positioned attacker intercepts or redirects the request. 4. The attacker returns syntactically valid JSON containing forged `iss_position.latitude` and `iss_position.longitude` values. 5. `jq` accepts those fields and displays the forged coordinates as the current ISS location. ### Impact Assessment Exploitation compromises the integrity and authenticity of the displayed ISS coordinates. An attacker can cause users or downstream workflows to consume false location data within the scope of this API result. No credential disclosure, local privilege gain, persistence, arbitrary code execution, or broader host compromise is established by the audited content.
- Remediation
- ## Remediation Suggestions Replace the plaintext endpoint with a trusted HTTPS endpoint that provides equivalent ISS-position data. Configure `curl` to report and fail on transport and HTTP errors, and validate the expected JSON structure before using the values. For example, if the provider supports HTTPS: ```bash curl --fail --silent --show-error "https://api.open-notify.org/iss-now.json" | jq -er '"Lat: \(.iss_position.latitude), Lon: \(.iss_position.longitude)"' ``` If that provider does not offer a valid HTTPS service, use a reputable alternative provider with authenticated TLS. Do not disable certificate verification. For stronger validation, ensure the latitude and longitude fields exist, are numeric, and fall within valid geographic ranges before displaying or forwarding them.
