Details
Alternatively, deprecate the Markdown ?style=… action entirely — themes can still set inline styles from PHP, but accepting attacker-controlled CSS from page content was always a footgun.
Defense in depth: extend Security::detectXss()'s html_inline_styles rule to also match Markdown-form ?style= query parameters in data[content] on save.
References
- Original advisory: GHSA-r7fx-8g49-7hhr
- Fix commit:
5a12f9be8(system/src/Grav/Common/Media/Traits/MediaObjectTrait.php) - Unpatched code:
system/src/Grav/Common/Media/Traits/MediaObjectTrait.phplines 519–524 - Project security policy:
SECURITY.md(trust-boundary severity model)