CVE-2026-74921: Document Gallery 4.0 - 5.1.1 - Contributor+ Stored XSS via Gallery Shortcode Attributes
The Document Gallery WordPress plugin through 5.1.1 does not sanitise or escape several gallery shortcode attributes before embedding them in a single-quoted HTML attribute in the rendered gallery markup, allowing users with the Contributor role and above to inject arbitrary event handlers that execute when a higher privileged user views the content.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue?
A user with the WordPress Contributor role or any higher-privileged role can exploit it by submitting content containing a crafted Document Gallery shortcode. Exploitation also requires a higher-privileged user to view the affected content.
What is the impact when the payload executes?
The injected event handler runs in the higher-privileged viewer's browser context. The vulnerability is rated with high impact to confidentiality, integrity, and availability.
Which plugin versions are affected?
Document Gallery versions through 5.1.1 are affected. The provided information does not identify a fixed version.
Is user interaction required for exploitation?
Yes. A higher-privileged user must view the contributor-supplied content containing the malicious gallery shortcode.