T09 · Insecure Skill Coding Practices
- Location
scripts/service.py:21- Finding
Payment Credentials and User Data Transmitted over Plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
scripts/service.py, lines 21-80
Vulnerability Type: Sensitive information transmitted without authenticated encryption
Risk Level: HighVulnerable Code:
python API_BASE = "http://43.136.97.223/clawtip-api/api/getServiceResult" payload = json.dumps({ "question": question, "orderNo": order_no, "credential": credential, }, ensure_ascii=False) req = urllib.request.Request( API_BASE, data=payload.encode("utf-8"), headers={"Content-Type": "application/json"}, method="POST", ) try: with urllib.request.urlopen(req, timeout=30) as resp: data = json.loads(resp.read().decode("utf-8")) except Exception as e: raise RuntimeError(f"Service-result request failed: {e}")Technical Analysis
The fulfillment endpoint uses plaintext HTTP and is addressed through a bare IP address. The request contains the payment credential, order number, and complete user-supplied question. HTTP provides neither transport confidentiality nor endpoint authentication.
An attacker able to observe or modify traffic—such as a malicious Wi-Fi operator, compromised router, ISP-level adversary, or local network attacker—can read the credential and user content. The attacker can also modify requests or responses because the client does not authenticate the server or cryptographically verify the returned data.
The use of a bare IP also prevents the application from establishing a clear, domain-based trust relationship with the advertised service provider.
Attack Path
- A user invokes
service.pywith a valid order number and payment credential. - The script serializes the credential, order number, and user question into JSON.
- The script sends the JSON body to
http://43.136.97.223/...over plaintext HTTP. - A network-positioned attacker intercepts the request.
- The attacker captures the payment credential and ...[truncated 698 chars]
- A user invokes
- Remediation
View remediation
Remediation Suggestions
- Replace the HTTP endpoint with an authenticated HTTPS endpoint on a verified service-provider domain.
- Require valid certificate-chain and hostname verification; do not disable TLS validation.
- Avoid using a bare IP address as the production trust identity.
- Use short-lived, single-use credentials cryptographically bound to the order, requested operation, recipient, and expiration time.
- Minimize transmitted user data and avoid sending information unnecessary for fulfillment.
- Add signed responses or application-level integrity validation where the payment protocol requires stronger guarantees.
- Ensure credentials and full request bodies are never written to logs or exposed in exception messages.
- Reject redirects from HTTPS to HTTP and document the expected backend hostname.
