T09 · Insecure Skill Coding Practices
- Location
scripts/cookidoo.py:34- Finding
Hardcoded OAuth Client Credential Enables Client Impersonation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/cookidoo.py, lines 34–36
Vulnerability Type: Hardcoded OAuth client credential
Risk Level: Mediumpython CLIENT_ID = "kupferwerk-client-nwot" CLIENT_SECRET = "Ls50ON1woySqs1dCdJge" AUTH_HEADER = "Basic a3VwZmVyd2Vyay1jbGllbnQtbndvdDpMczUwT04xd295U3FzMWRDZEpnZQ=="Technical Analysis
The source code embeds an OAuth client identifier and client secret in plaintext. The same credential pair is also included in Base64-encoded form in
AUTH_HEADER, which is sent to the Cookidoo authentication endpoint during the password-grant login flow.Base64 encoding does not provide confidentiality. Anyone who can obtain the Skill package can read
CLIENT_SECRETdirectly or decodeAUTH_HEADERand reuse the credential outside this application. If this credential originated from a public mobile client, it cannot function as a securely held secret, but embedding and treating it as one still permits third parties to impersonate that OAuth client.The transmission of a user's Cookidoo email and password to the declared Vorwerk HTTPS authentication endpoint is consistent with the Skill's documented functionality and was not found to be unrelated exfiltration. However, the hardcoded client credential exceeds secure configuration practices and creates a reusable authentication artifact.
Attack Path
- An attacker obtains a copy of the publicly distributed or otherwise accessible Skill package.
- The attacker opens
scripts/cookidoo.pyand readsCLIENT_SECRET, or Base64-decodesAUTH_HEADER. - The attacker constructs requests to the Cookidoo OAuth token endpoint while presenting the embedded Basic authorization credential.
- The attacker impersonates the identified client in authentication attempts, potentially automating requests or causing activity to be attributed to that client.
- Abuse may continue until the service provider rotates, restricts, or revoke ...[truncated 847 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
CLIENT_SECRETand the precomputedAUTH_HEADERvalue from the source repository and distributed Skill package. - Prefer an officially supported public-client authorization flow, such as Authorization Code with PKCE, which does not depend on a confidential secret embedded in client-side code.
- If the provider requires a confidential client, move authentication behind a controlled backend capable of securely storing the credential. Do not distribute that credential to Skill users.
- If runtime configuration is unavoidable, retrieve the client credential from a dedicated secret manager or protected runtime configuration rather than source code. Environment variables improve source hygiene but do not make a secret safe when distributed to untrusted clients.
- Rotate or revoke the exposed credential in coordination with the service provider, because removing it from future versions does not invalidate copies already distributed.
- Avoid retaining duplicate credential representations. Construct authorization headers only at runtime from securely obtained values and prevent credentials from appearing in logs or error output.
- Validate commands and their arguments before invoking the login routine so malformed or unknown commands do not unnecessarily use account credentials or contact the authentication service.
- Remove
