T09 · Insecure Skill Coding Practices
- Location
SKILL.md:43- Finding
WordPress Application Password Stored and Used Insecurely
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 43–49 and 245–252
Vulnerability Type: Plaintext credential storage and process-argument exposure
Risk Level: MediumVulnerable Code
bash WP_URL=https://yoursite.com WP_USER=your_username WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxxbash source ~/.openclaw/.wp-[yoursite].envbash MEDIA=$(curl -s -X POST "$WP_URL/wp-json/wp/v2/media" \ -u "$WP_USER:$WP_APP_PASSWORD" \ -H "Content-Disposition: attachment; filename=post-image.png" \ -H "Content-Type: image/png" \ --data-binary @/tmp/openclaw/uploads/[topic]-vi.png)The same
curl -u "$WP_USER:$WP_APP_PASSWORD"pattern is repeated when publishing and modifying posts at lines 278–280 and 290–292.Technical Analysis
The setup instructions place a reusable WordPress application password in a plaintext environment file without requiring restrictive file or parent-directory permissions. The resulting access depends on the user's existing
umaskand directory permissions. On a shared or compromised host, another local account or process may therefore be able to read the credential file.Passing the credential through
curl -ualso expands it into the command's argument vector while the process is running. Depending on operating-system process-inspection restrictions, an authorized local observer may be able to recover it.Using a WordPress application password is necessary for the declared publishing function, and the reviewed content does not intentionally transmit it to any host other than the user-configured WordPress endpoint. The issue is the absence of minimum protections around storage and invocation.
Attack Path
- A user follows the instructions and creates
~/.openclaw/.wp-[yoursite].env. - The file or its parent directory inherits permissions that allow another local account or compromised process to read it.
- Alternatively, an authorized local observer inspects the argument vector o ...[truncated 1068 chars]
- A user follows the instructions and creates
- Remediation
View remediation
Remediation Suggestions
- Create the credential file with restrictive permissions from the outset:
bash install -d -m 700 ~/.openclaw umask 077 touch ~/.openclaw/.wp-[yoursite].env chmod 600 ~/.openclaw/.wp-[yoursite].env-
Explicitly document that the file must never be committed to source control, copied into logs, or placed in a shared directory.
-
Prefer an operating-system credential manager or another protected secret provider over a plaintext environment file.
-
Avoid exposing the password directly in command-line arguments where practical. Use a protected, temporary curl configuration or another authentication mechanism that does not place the expanded secret in the process argument vector, and remove temporary credential material immediately after use.
-
Create the application password under a dedicated, least-privileged WordPress publishing account rather than an administrator account.
-
Restrict the account to only the capabilities needed to upload media and create or update posts.
-
Rotate the application password periodically and revoke it immediately if local credential exposure is suspected.
-
Validate that
WP_URLuses trusted HTTPS and points to the intended WordPress host before sending credentials.
