T09 · Insecure Skill Coding Practices
- Location
SKILL.md:91- Finding
SMTP Password Disclosure Through Troubleshooting Command
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 91
Vulnerability Type: Plaintext credential exposure
Risk Level: Mediumbash python3 send_email.py username python3 send_email.py passwordTechnical Analysis
The troubleshooting documentation instructs the operator or AI agent to invoke commands that retrieve the configured SMTP username and password. In particular, the
passwordcommand may expose the plaintext SMTP secret in command output.Printing a credential unnecessarily places it in additional security domains, including terminal output, AI-agent context, execution logs, troubleshooting transcripts, monitoring systems, and retained session records. Any party or process able to access those records could recover the credential without directly accessing the original secret store.
Attack Path
- Email delivery fails or an operator initiates troubleshooting.
- The operator or AI agent follows the documented instructions.
python3 send_email.py passwordretrieves and prints the configured SMTP password.- The plaintext output is retained in a terminal transcript, agent context, command log, or monitoring system.
- A user or process with access to that retained output obtains the SMTP credential.
- The exposed credential may be used to authenticate to the associated mail service, subject to the permissions and controls applied to that SMTP account.
Impact Assessment
Successful exploitation could disclose the configured SMTP username and password. Depending on the privileges of the affected account, an attacker could send unauthorized email, impersonate the account, distribute phishing content, access mail-related services, or damage the sender's reputation.
The maximum scope is limited by the SMTP account's permissions, provider-side access controls, network restrictions, and multifactor authentication requirements. This finding does not establish that credentials a ...[truncated 123 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the command that prints the SMTP password.
- Replace credential-retrieval troubleshooting with a redacted status command that reports only whether each required value is configured.
- Add an authentication test that returns success or failure without displaying the submitted secret.
- Ensure diagnostic output masks sensitive values, showing at most a short non-sensitive suffix when identification is necessary.
- Prevent secrets from being written to logs, terminal transcripts, exception messages, or AI-agent context.
- Store SMTP credentials in an operating-system credential store, dedicated secret manager, or protected environment rather than a plaintext configuration file.
- If the password command has already been used in recorded sessions, review relevant logs and transcripts, remove exposed values where feasible, and rotate the affected SMTP credential.
- Restrict the SMTP account to the minimum necessary sending privileges and configure provider-side rate limits and alerts.
