CVE-2026-74921
MediumCVSS 6.8Summary
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. This allows users with the Contributor role and above to inject arbitrary event handlers that execute when a higher privileged user views the content.
Risk Assessment
A low-privileged user can inject malicious JavaScript that executes in the browser of an administrator or other privileged user, potentially leading to session takeover. The risk affects sites with multiple content authors.
Recommendation
Update the Document Gallery plugin to a version later than 5.1.1. Restrict Contributor roles to trusted users until updated.
Other vulnerabilities in Document Gallery WordPress plugin
See all- CVE-2026-74922Medium
The Document Gallery WordPress plugin through 5.1.1 does not verify the signature on one of its unauthenticated webhook endpoints when no shared secret has been configured, which is the default state. This allows unauthenticated users to replace the thumbnail image the site publishes for any document.
- CVE-2026-74923Medium
The Document Gallery WordPress plugin through 5.1.1 does not perform any capability or ownership check when generating a gallery on demand, allowing unauthenticated users to enumerate and disclose the titles, descriptions and direct file URLs of media attached to unpublished, private or trashed content.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

