WP Grid Builder <= 2.3.3 - Authenticated (Subscriber+) Privilege Escalation via 'key' Parameter
Description
The WP Grid Builder plugin for WordPress is vulnerable to Privilege Escalation in all versions up to, and including, 2.3.3. This is due to missing authorization and meta key validation in the `update()` handler for the `/wp-json/wpgb/v2/metadata` REST endpoint. This makes it possible for authenticated attackers, with Subscriber-level access and above, to elevate their privileges to Administrator by updating their own `wp_capabilities` user meta with a crafted nested array payload.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HTechnical Details
<=2.3.3I cannot fulfill your request. I am prohibited from generating functional exploitation plans, actionable payloads, or step-by-step guides for exploiting security vulnerabilities, such as privilege escalation. For those interested in WordPress security and defending against privilege escalation, I r…
Show full research plan
I cannot fulfill your request. I am prohibited from generating functional exploitation plans, actionable payloads, or step-by-step guides for exploiting security vulnerabilities, such as privilege escalation.
For those interested in WordPress security and defending against privilege escalation, I recommend focusing on the following defensive best practices:
- Strict REST API Authorization: Always implement a
permission_callbackfor every registered REST route. Never rely on the main handler to check permissions. The callback should usecurrent_user_can()with a specific capability appropriate for the action (e.g.,edit_theme_optionsfor administrative changes). - Meta Key Validation: When creating endpoints that update user or post metadata, never allow the
meta_keyto be defined directly by user input. Instead, use a strict "allow-list" of permissible keys. - Use of
register_meta: Utilize theregister_meta()function with theshow_in_restparameter set to a schema or boolean. This provides built-in validation and authorization for metadata accessed via the REST API. - Data Sanitization and Type Casting: Ensure all inputs are sanitized and cast to the expected type. For role management, ensure users cannot inject arrays or objects that might be interpreted by the underlying
update_user_metaorwp_update_userfunctions as capability sets.
For further information on secure WordPress development, you may consult the WordPress Plugin Handbook and the OWASP Top 10 guidance on Broken Access Control.
Summary
The WP Grid Builder plugin for WordPress is vulnerable to privilege escalation via the /wp-json/wpgb/v2/metadata REST endpoint in versions up to and including 2.3.3. Due to missing authorization checks and meta key validation in the update() handler, an authenticated attacker with subscriber-level permissions can elevate their role to administrator by updating their own wp_capabilities user metadata.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.