T09 · Insecure Skill Coding Practices
- Location
SKILL.md:47- Finding
API Token Exposed Through a Plaintext HTTP Request
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:47-49
Vulnerability Type: Sensitive credential transmission over plaintext HTTP
Risk Level: Highbash curl "http://data.zz.baidu.com/urls?site=https://example.com&token=YOUR_TOKEN" \ -H "Content-Type:text/plain" \ --data-binary @urls.txtTechnical Analysis
The documented command sends a Baidu Webmaster API token as a URL query parameter over unencrypted HTTP. Because TLS is not used, the token and submitted URL data can be observed or modified by network intermediaries. Query-string credentials may additionally be retained in proxy logs, command histories, monitoring systems, or other URL-based logs.
The placeholder does not contain a real secret in the audited file. The vulnerability arises when a user replaces
YOUR_TOKENwith an operational credential and executes the documented command.Attack Path
- A user replaces
YOUR_TOKENwith a valid Baidu Webmaster API token. - The user executes the documented
curlcommand. - The HTTP request traverses a compromised or untrusted network, proxy, gateway, or monitoring device.
- An attacker captures the plaintext request or obtains the URL from intermediary logs.
- The attacker extracts and reuses the token to perform API operations permitted by that credential, including unauthorized URL submissions for the associated site.
Impact Assessment
Successful exploitation exposes the Baidu submission token and the contents of
urls.txt. An attacker can obtain the API privileges assigned to the compromised token, but this does not inherently provide operating-system privileges. The practical scope is limited by the token's permissions and Baidu's server-side controls. Unauthorized URL submissions, indexing manipulation, service abuse, and disclosure of unpublished or sensitive submitted URLs may result.- A user replaces
- Remediation
View remediation
Remediation Suggestions
- Replace the plaintext endpoint with Baidu's officially supported HTTPS endpoint.
- If the service does not support HTTPS, do not recommend direct token submission over untrusted networks; direct users to a secure official interface instead.
- Avoid placing credentials in URL query strings where an API-supported authorization header or protected request body is available.
- Warn users not to paste real tokens into scripts committed to source control.
- Disable verbose request logging and redact token-bearing URLs from shell history, proxy logs, CI output, and monitoring systems.
- Use narrowly scoped, revocable credentials and rotate any token that may already have been transmitted through this command.
