T09 · Insecure Skill Coding Practices
- Location
scripts/emr_qc_impl.py:53- Finding
Unrestricted API Endpoint Can Receive the App Key and Medical Record Data
- Content
View full analysis
str: payload = {"model": model, "messages": messages, "temperature": 0} resp = _http_post(url, payload, headers, timeout=timeout) ``` The destination is directly configurable through the command-line entry points: ```python parser.add_argument( "--base", default=DEFAULT_LLM_BASE, help=f"Model base URL (default: {DEFAULT_LLM_BASE}).", ) ``` ### Technical Analysis The user-controlled `--base` value is used to construct the destination of an authenticated HTTP request without validating the scheme or hostname. The request includes both: - The HiVoice application key in the `Authorization: Bearer` header. - LLM messages containing patient-derived chief-complaint and present-illness data. The implementation does not require HTTPS and does not restrict the destination to the documented HiVoice host. Consequently, an attacker who can influence invocation arguments can redirect the request to an attacker-controlled HTTP or HTTPS server. Using an HTTP URL additionally exposes the bearer credential and medical data to network interception. This issue crosses a significant trust boundary because a credential intended for one service can be transmitted to an unrelated destination. ### Attack Path 1. The attacker gains the ability to influence the Skill invocation, deployment configuration, wrapper script, or ...[truncated 1443 chars]- Remediation
View remediation
