wp-block-security

Trace stored XSS in WordPress Gutenberg render_callback functions.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/obenland/dotfiles --skill wp-block-security
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: wp-block-security
Source: https://github.com/obenland/dotfiles/tree/main/claude/.claude/skills/wp-block-security
Command: npx skills add https://github.com/obenland/dotfiles --skill wp-block-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

WordPress security teams and developers need a structured methodology to identify stored XSS vulnerabilities in Gutenberg blocks by tracing how user-controlled $attributes propagate through render_callback output.

Core Features & Use Cases

  • Stepwise mapping of render_callback registrations to their output contexts to surface unsafe attribute usage.
  • Context-aware escaping guidance, severity classification, and a structured report format for reproducible audits.
  • Real-world reference patterns illustrating insecure and secure render paths to train developers and CI pipelines.

Quick Start

Run a targeted audit on a WordPress Gutenberg block by tracing how $attributes flow from render_callback to HTML output and validating the escaping at each step.

Frequently Asked Questions about wp-block-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find stored XSS vulnerabilities in WordPress Gutenberg blocks?▼

To find stored XSS in WordPress Gutenberg blocks, trace how user-controlled $attributes flow into HTML output through render_callback functions. Analyze the full call chain of each callback registered via register_block_type to identify escaping mistakes.

What is the process for auditing Gutenberg render_callback output contexts?▼

Auditing Gutenberg render_callback output contexts involves stepwise mapping of attribute flow, checking escaping adequacy at each output point, classifying severity, and generating a structured vulnerability report for reproducible security checks.

Does this XSS security auditing method work with blocks defined via block.json?▼

No, this XSS security auditing method does not work with blocks defined via block.json. The scope is strictly limited to tracing $attributes through render_callback paths registered via register_block_type, ignoring $content and $block.

How do I check if my block attributes are properly escaped in WordPress?▼

To check if block attributes are properly escaped in WordPress, map the render_callback output contexts and verify that adequate escaping functions are applied to user-controlled $attributes before they reach the HTML output.

What limitations exist when tracing user-controlled attributes in Gutenberg?▼

When tracing user-controlled attributes in Gutenberg, limitations include ignoring $content, $block, and blocks defined via block.json, restricting the analysis exclusively to render_callback paths registered through register_block_type.

Can I use this approach to train CI pipelines on WordPress security patterns?▼

Yes, you can use this approach to train CI pipelines on WordPress security patterns by applying the stepwise detection methodology and real-world reference patterns illustrating insecure and secure render paths to prevent escaping mistakes.