Summary
WordPress Global Styles accepts attacker-controlled preset and raw CSS-rule data beyond the intended safe-style boundary. A lower-privilege authenticated user can persist styling that is rendered site-wide.
Affected Products
WordPress core 7.0.4; Global Styles / theme.json processing.
Affected Scope
- Product
- WordPress
- Component
- Global Styles / theme.json stylesheet generation
- Affected function
- Global Styles preset and raw style-rule processing; theme.json settings/styles and generated stylesheet
- Affected versions
- WordPress 7.0.4 (revalidated). Earlier/fixed versions are not asserted without a pinned vendor confirmation.
- Safe version
- No fixed version confirmed in the supplied material.
- CWE
- CWE-862; CWE-20
Technical Summary
The Global Styles pipeline persists attacker-controlled preset/raw CSS data and emits it in the site-wide stylesheet without consistently preserving the edit_css boundary. The proof is limited to a controlled style-integrity change; reusable CSS payloads are withheld.
Prerequisites and Permissions
Authenticated lower-privilege user able to submit the documented Global Styles/theme settings data, but lacking the intended CSS-editing capability.
Affected Locations
wp-includes/global-styles-and-settings.php; theme.json Global Styles settings/styles; preset and raw CSS-rule inputs. Exact line numbers are not asserted where the supplied report did not pin them.
Reproducible Proof
In a controlled site, the documented lower-privilege account submitted the affected Global Styles data and the resulting stylesheet reflected the unauthorized rule. The proof demonstrates persistence and rendering only; the exact breakout payload is withheld.
Vulnerable Code
$css = wp_get_global_stylesheet( $theme_json );
$css .= $styles_variables;
return $css;Severity
high
Technical Analysis
The theme Global Styles data path accepts preset values and raw style rules, then serializes them into the generated Global Stylesheet. The authorization boundary for CSS editing is not consistently enforced before the value reaches stylesheet generation, so the stored value is treated as valid theme styling.
Impact
Integrity impact: a lower-privilege authenticated user can alter the presentation of the site for other visitors and administrators. The supplied evidence does not establish script execution, credential theft, or server-side code execution.
Remediation
Enforce the intended edit_css/style capability before accepting Global Styles CSS data; apply the same strict declaration/property validation to presets and raw rules; add regression tests for breakout attempts and for users without edit_css.
Timeline
- Published
- Advisory published
Credits
Reported by Aria Akhavan. Disclosure timeline: 2026-08-12 submission; 2026-09-07 follow-up; no response documented by 2026-09-14.