From the v0.12.0 MCP endpoint security review (PR #216, finding [Low #6]).
`Settings::update_field()` for the `ability_list` type validates each entry against `^[a-z0-9-]+/[a-z0-9-]+$`. The WP Abilities API itself doesn't strictly constrain ability IDs to that grammar — names like `MyPlugin/list_orders` or `woo/Get-Product` could be valid registrations.
Today, a third-party ability with such a name cannot be allowlisted — the admin ticks the box, hits save, and the sanitizer silently drops it with no UI feedback.
Fix:
- Confirm the actual WP 6.9 Abilities API ID grammar (check core source / docs).
- Widen the regex accordingly. Still exclude null bytes, slashes (other than the single separator), control chars.
- Optional UX: surface a warning toast when an entry is dropped by the sanitizer.
Not a security issue (fails closed), but a correctness gap.
From the v0.12.0 MCP endpoint security review (PR #216, finding [Low #6]).
`Settings::update_field()` for the `ability_list` type validates each entry against `^[a-z0-9-]+/[a-z0-9-]+$`. The WP Abilities API itself doesn't strictly constrain ability IDs to that grammar — names like `MyPlugin/list_orders` or `woo/Get-Product` could be valid registrations.
Today, a third-party ability with such a name cannot be allowlisted — the admin ticks the box, hits save, and the sanitizer silently drops it with no UI feedback.
Fix:
Not a security issue (fails closed), but a correctness gap.