T09 · Insecure Skill Coding Practices
- Location
scripts/webpush_client.py:54- Finding
Basic Authentication Credentials Can Be Redirected to an Arbitrary Server
- Content
View full analysis
dict: url = f"{self._base_url}{path}" resp = requests.request( method, url, auth=self._auth, headers=self._headers, json=payload, params=params, ) ``` ### Technical Analysis The constructor accepts an unrestricted caller-controlled `base_url`. The request method subsequently attaches the AppKey and Master Secret to every request through HTTP Basic Authentication. The implementation does not: - Require the HTTPS scheme. - Restrict destinations to documented EngageLab API hosts. - Reject embedded URL credentials or malformed authority components. - Explicitly constrain redirect behavior or verify the final authentication destination. As a result, a malicious or mistakenly configured `base_url` can cause the client to transmit credentials to an attacker-controlled server. Supplying an HTTP endpoint would additionally expose credentials and request data to network interception. Although sending credentials to EngageLab is necessary for the Skill's declared functionality, allowing those credentials to be sent to any caller-selected host exceeds the minimum privilege and trust boundary required. ### Attack Path 1. An attacker persuades a user, application, or agent to initialize the client with an attacker-controlled endpoint: ```python client = EngageLabWebPush( app_key, master_secret, base_ur ...[truncated 1180 chars]- Remediation
View remediation
