T09 · Insecure Skill Coding Practices
- Location
proposal.md:78- Finding
Session API Credential Exposed in Payment QR Page Query String
- Content
View full analysis
Vulnerability Details
File Location:
proposal.md:78
Vulnerability Type: Credential exposure through a URL query parameter
Risk Level: HighVulnerable Code
text GET <gateway-domain>/api/quickInsure/payQrcode?url=<zaPayUrl(URLencode)>&orderNo=<outTradeNo>&expiryTime=<expiryTime(URLencode)>&car-api-key=<$CAR_API_KEY(URLencode)>Technical Analysis
The payment workflow embeds
CAR_API_KEYdirectly into the query string used to open the QR-code page. URL encoding changes only the representation of the credential; it does not protect its confidentiality.Query-string credentials can be retained or exposed through:
- Browser history and address-bar synchronization
- Browser screenshots and copied URLs
- Reverse-proxy and web-server access logs
- Monitoring, diagnostic, and browser automation logs
- Referrer information, depending on the page and referrer policy
- Local browser profile access
This behavior also conflicts with the authentication guidance in
auth.md, which requires authenticated API credentials to be transmitted through thecar-api-keyrequest header rather than the query string.Attack Path
- A customer completes quotation and underwriting.
- The Skill receives a valid same-day
CAR_API_KEY. - The Skill constructs and opens the payment QR-code URL with the key in the query string.
- The complete URL is retained in browser history, automation telemetry, proxy logs, or server access logs.
- An attacker or lower-privileged operator with access to one of those records extracts the
car-api-keyvalue. - The attacker submits authenticated requests to supported insurance APIs before the credential expires.
Impact Assessment
Exposure grants the attacker the authenticated API privileges associated with the affected customer session for the remaining credential lifetime. Depending on backend authorization cont ...[truncated 323 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
car-api-keyfrom every URL and query string. - Authenticate the QR-page request through a protected request header where the client and browser integration support it.
- Prefer a backend-generated, cryptographically random, single-use payment-page token.
- Scope that token only to one order and one QR-page operation.
- Apply a short expiration period and invalidate the token immediately after use.
- Ensure the token cannot invoke quotation, underwriting, or policy APIs.
- Configure
Referrer-Policy: no-referreron sensitive payment pages. - Redact existing query-string credentials from proxy, application, browser automation, and access logs.
- Revoke exposed keys and review historical logs for accidental credential retention.
- Remove
