T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:94
- Finding
- TLS Certificate Verification Disabled for Sensitive IVVR Requests## Vulnerability Details **File Location**: `SKILL.md`, lines 94–100 and 131–137 **Vulnerability Type**: Improper TLS certificate validation **Risk Level**: High ### Vulnerable Code ```python upload_resp = requests.post( upload_url, headers=headers, files=files, timeout=60, verify=False ) ``` ```python send_resp = requests.post( send_url, headers=headers, json=payload, timeout=30, verify=False ) ``` ### Technical Analysis Both outbound requests explicitly set `verify=False`, disabling validation of the server's TLS certificate. The upload request transmits signed authentication headers and the selected local video. The notification request transmits authentication headers, the recipient's phone number, caller information, and the uploaded file identifier. An active network attacker can present an arbitrary certificate without causing the client to reject the connection. Additionally, `BASE_URL` is supplied through an environment variable without an enforced HTTPS scheme or destination allowlist. If it is accidentally or maliciously configured with an HTTP URL, all request data may be transmitted without encryption. The Base64 operation elsewhere in the file encodes an HMAC digest for use as an authentication signature. It does not encode the video, phone number, access secret, or another source-data payload and is not, by itself, evidence of a covert exfiltration channel. Uploading the selected video and sending the recipient number are consistent with the Skill's declared IVVR functionality, but performing those operations without authenticated transport exceeds safe minimum-privilege expectations for sensitive data. ### Attack Path 1. An attacker obtains a network interception position, manipulates DNS or routing, or influences the configured `BASE_URL`. 2. The attacker redirects the Skill to an attacker-controlled endpoint or intercepts its connection to ...[truncated 1535 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `verify=False` from both `requests.post` calls so that certificate verification remains enabled by default: ```python upload_resp = requests.post( upload_url, headers=headers, files=files, timeout=60 ) ``` ```python send_resp = requests.post( send_url, headers=headers, json=payload, timeout=30 ) ``` 2. Parse and validate `BASE_URL` before use. Require the `https` scheme, reject embedded credentials and unexpected ports, and reject malformed or non-network URLs. 3. Restrict outbound requests to an explicit allowlist of approved IVVR hostnames. Do not permit arbitrary destinations through an unrestricted environment variable. 4. If the service uses a private certificate authority, configure `verify` with the path to the trusted CA bundle rather than disabling verification. 5. Protect against DNS rebinding and internal-network targeting where the runtime threat model permits attacker influence over configuration. Resolve and validate destinations according to the deployment's egress policy. 6. Enforce server-side timestamp expiration, one-time nonces or request identifiers, and replay detection for signed requests. Avoid relying only on a millisecond timestamp. 7. Limit egress at the runtime or container level so the Skill can connect only to the approved IVVR service over TLS. 8. Avoid returning raw exception details to untrusted callers where those details could expose endpoint, filesystem, or networking information. Log detailed diagnostics securely and return a generic failure message.
