Back to skill

Security audit

WordPress Blog Publisher

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent WordPress publishing skill, but it needs review because it can publish or alter live site content while handling credentials, external media, and raw HTML without enough safety boundaries.

Install only if you are comfortable with an agent using a WordPress Application Password to publish or update real site content. Use a dedicated least-privilege WordPress account, require HTTPS, review the first item as a draft, avoid untrusted markdown, and do not let it fetch or mirror external images or raw embeds without explicit review.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:38
Finding
WordPress Basic Authentication Credentials May Be Sent Without Enforced TLS<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 38–50 **Vulnerability Type**: Credentials transmitted to a user-supplied network destination without mandatory HTTPS validation **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ### Step 1 — Authenticate **Required credentials**: - `site_url`: e.g., `https://example.com` (no trailing slash) - `username`: WP admin username - `app_password`: Application Password from WP Admin → Users → Profile → Application Passwords **Auth header**: ``` Authorization: Basic base64(username:app_password) ``` **Test connection**: ``` GET {site_url}/wp-json/wp/v2/users/me ``` ``` ### Technical Analysis The Skill instructs the Agent to construct an HTTP Basic Authentication header from the WordPress username and Application Password, then send it to a user-provided `site_url`. Although the example uses HTTPS, the instructions do not require the `https://` scheme, reject plaintext HTTP, validate the hostname, or prohibit forwarding the authorization header through cross-origin redirects. Base64 encoding is not encryption. If the supplied endpoint uses HTTP, the username and Application Password can be read by an on-path attacker. If the URL or redirect destination is attacker-controlled, the credentials can be delivered directly to an unintended server. This network access is necessary for the declared WordPress publishing function, but unrestricted destination selection and the absence of mandatory transport security exceed the minimum safe privileges required. ### Attack Path 1. An attacker or untrusted workflow supplies an `http://` WordPress URL or an HTTPS endpoint that redirects to another origin. 2. The Agent follows the Skill and creates `Authorization: Basic base64(username:app_password)`. 3. The Agent sends the connection test or publishing request to that endpoint. 4. The credential is exposed over plaintext transport or delivered to the attacker-controlled destination. 5. The a ...[truncated 789 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require `site_url` to use HTTPS and reject all plaintext HTTP destinations before constructing an authorization header. 2. Canonicalize and validate the hostname against a user-confirmed or configured allowlist. 3. Disable automatic redirects for authenticated requests, or strip `Authorization` whenever the scheme, hostname, or port changes. 4. Resolve and display the final authentication origin for explicit confirmation before sending credentials. 5. Use a dedicated WordPress account with only the capabilities needed to publish posts and upload media. 6. Use a separate, revocable Application Password for this workflow rather than an administrator credential. 7. Prevent credentials from appearing in logs, error messages, command histories, or progress output. 8. Document certificate-validation failures as fatal; do not permit insecure TLS bypasses. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/markdown-to-html-rules.md:78
Finding
Unvalidated External Image Downloads Create an SSRF and Resource-Exhaustion Primitive<![CDATA[ ## Vulnerability Details **File Location**: `references/markdown-to-html-rules.md`, lines 78–83 **Vulnerability Type**: Server-Side Request Forgery through unvalidated image URLs **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ### External URL Images 1. Download image to temp location 2. Upload to WP: `POST /wp-json/wp/v2/media` 3. Get `source_url` from response 4. Replace original `src` with `source_url` ``` ### Technical Analysis The Skill directs the Agent to download every externally referenced image to a temporary location. It does not impose restrictions on: - Permitted URL schemes. - Destination hostnames or ports. - Loopback, private, link-local, multicast, or reserved addresses. - DNS rebinding or address changes after validation. - Redirect destinations. - Download size, duration, or redirect count. - Response MIME type or actual file signature. Consequently, attacker-controlled Markdown can turn the Agent into a network request proxy. A URL presented as an image can target internal services, localhost endpoints, or cloud instance metadata services. The downloaded response is then uploaded to WordPress, potentially creating an exfiltration route for otherwise inaccessible data. Oversized or indefinitely streamed responses can also consume disk space, memory, bandwidth, and execution time. The temporary-file instruction does not define secure file creation, quotas, or guaranteed cleanup. ### Attack Path 1. An attacker places a crafted image reference in content processed by the Skill, such as a URL pointing to a loopback address, private service, or cloud metadata endpoint. 2. The Agent interprets the URL as an external image and downloads it. 3. The request reaches a service that is accessible from the Agent's network but inaccessible to the attacker. 4. The response is written to a temporary location. 5. Following the workflow, the Agent uploads the response bytes to the WordPress media endpoint. 6. If WordPress acce ...[truncated 1011 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit only `https://` image URLs, with narrowly justified exceptions. 2. Resolve the destination before connecting and block loopback, private, link-local, multicast, unspecified, and reserved IP ranges for both IPv4 and IPv6. 3. Repeat destination validation after every redirect and DNS resolution; protect against DNS rebinding. 4. Use an explicit allowlist of trusted image hosts where practical. 5. Disallow nonstandard ports unless explicitly approved. 6. Enforce strict connection, read, and total-operation timeouts. 7. Limit the number of redirects and maximum downloaded size. 8. Verify both the declared MIME type and file signature against supported image formats before upload. 9. Reject HTML, XML, SVG, executable content, and polyglot files unless separately sanitized and explicitly required. 10. Create temporary files securely with restrictive permissions, random names, storage quotas, and guaranteed cleanup. 11. Require user confirmation before fetching content from an unknown domain. 12. Do not upload a fetched response if validation fails at any stage. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/markdown-to-html-rules.md:96
Finding
Unsanitized Raw HTML and Arbitrary Iframes May Be Published to WordPress<![CDATA[ ## Vulnerability Details **File Location**: `references/markdown-to-html-rules.md`, lines 96–100 **Vulnerability Type**: Stored active-content injection through unsanitized HTML and iframe pass-through **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ## What NOT to Convert - Do not convert HTML already in the markdown (pass through as-is) - Do not strip `<iframe>` embeds (YouTube, etc.) - Do not add `<html>`, `<head>`, or `<body>` wrappers ``` ### Technical Analysis The Skill explicitly instructs the Agent to preserve HTML already present in Markdown and to retain iframe elements. It does not require sanitization, an HTML element and attribute allowlist, safe URL-scheme validation, or an allowlist of trusted iframe origins. If article content is untrusted, it can contain active markup, event-handler attributes, dangerous URLs, tracking elements, deceptive overlays, or iframes hosted by an attacker. WordPress may sanitize some markup depending on configuration and the authenticated user's capabilities, but relying on unspecified downstream filtering is unsafe. Privileged WordPress users may have permission to publish markup that lower-privileged users cannot. This behavior is not required for ordinary Markdown publishing. Supporting approved embeds can be implemented with a narrow host and attribute allowlist rather than passing all raw HTML through unchanged. ### Attack Path 1. An attacker supplies or modifies Markdown content in an upstream source such as a shared table, document, or content queue. 2. The content includes malicious raw HTML or an iframe referencing an attacker-controlled origin. 3. The Agent follows the conversion rules and preserves the markup without sanitization. 4. The Agent submits the resulting HTML using an authenticated WordPress account. 5. If the WordPress configuration accepts the markup, it becomes stored content. 6. Visitors or administrators opening the published page load the hostile embed or exe ...[truncated 977 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Sanitize all generated HTML with a mature parser-based sanitizer before submission to WordPress. 2. Define a strict allowlist of required formatting elements and attributes. 3. Remove scripts, event-handler attributes, dangerous CSS, forms, objects, embeds, and unsafe URL schemes. 4. Permit iframes only for explicitly approved origins, such as exact trusted video-provider hostnames. 5. For allowed iframes, enforce restrictive `sandbox`, `allow`, and `referrerpolicy` attributes and prohibit arbitrary navigation capabilities. 6. Reject `javascript:`, unsafe `data:`, and other active URL schemes in links and media attributes. 7. Treat raw HTML from upstream content as untrusted even when it appears to be authored internally. 8. Create the first batch item as a non-public draft and require human review of all raw HTML and embeds. 9. Use a dedicated least-privilege WordPress account without unfiltered HTML privileges where possible. 10. Apply defense in depth with WordPress-side sanitization and an appropriate Content Security Policy. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This markdown reference includes a Basic Authorization header and application password format, which involves sensitive credentials. The document provides no warning about protecting app passwords, avoiding accidental logging/sharing, or using HTTPS when transmitting them, despite the category requiring warnings for behaviors affecting privacy or system integrity.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The reference documents create, update, and delete endpoints for WordPress posts, including a DELETE operation, but does not include any warning that these actions modify live site content and may be irreversible or affect published data. For markdown files, omission of warnings about actions affecting user data or system integrity is in scope.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The guidance instructs the agent to fetch third-party image URLs and re-upload them to WordPress without requiring user awareness or confirmation that external content will be retrieved, transferred, and republished. In a publishing skill, this can cause unintended network access, import untrusted or copyrighted material, and silently move third-party content into the user's own site infrastructure.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The rules direct the system to generate images from prompts and publish them to WordPress without warning that prompts may be sent to an external image generation service and that the resulting media will be publicly posted. This creates data handling and publication risks, especially if prompts contain sensitive information or if users do not realize generated assets will be uploaded automatically.

Static analysis

No suspicious patterns detected.