CVE-2026-9134: Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel <= 3.1.31 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'custom_attribute_key' Shortcode Parameter
The FooGallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'customattributekey' shortcode parameter in versions up to, and including, 3.1.31 This is due to an incomplete JavaScript event handler blacklist in the foogallerysanitizejavascript() function, which blocks only a subset of HTML event attributes (onmouseover, onmouseout, onpointerenter, onclick, onload, onchange, onerror) while permitting others such as 'onmouseenter', combined with the failure to escape the attribute key when building the gallery container HTML in foogallerybuildcontainerattributessafe(). This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-9134?
CVE-2026-9134 has a medium severity score of 6.4.
What type of vulnerability is CVE-2026-9134?
CVE-2026-9134 is an Authenticated Stored Cross-Site Scripting (XSS) vulnerability.
How do I fix CVE-2026-9134?
To fix CVE-2026-9134, update the FooGallery plugin to a version later than 3.1.31.
What versions of FooGallery are affected by CVE-2026-9134?
FooGallery versions up to and including 3.1.31 are affected by CVE-2026-9134.
What is the cause of CVE-2026-9134?
CVE-2026-9134 is caused by an incomplete JavaScript event handler blacklist in the foogallery_sanitize_javascript() function.