CVE-2026-135471: Dynamic Product Gallery for WooCommerce before 3.6.2 Stored XSS via Shortcode
Dynamic Product Gallery for WooCommerce before 3.6.2 contains a stored cross-site scripting vulnerability that allows authenticated attackers with Contributor-level access or above to inject arbitrary JavaScript via the productid attribute of the [wcproductdgallery] and [wcproductdynamicgallery] shortcodes. The parseshortcodeproductdynamicgallery() function passes productid only through escattr(), and getgallerymain() prints it unescaped into the a3-wc-dynamic-gallery-init-inline-script inline script as part of a JavaScript variable name, so a value such as 342;alert(document.domain)// breaks out of the declaration. The injected script executes in the browser of any user who views the post, including editors or administrators who preview or approve it.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this vulnerability?
An authenticated WordPress user with Contributor-level access or higher can exploit it by creating or modifying content containing a vulnerable gallery shortcode.
What user interaction is required for the injected code to run?
A user must view the affected post. The stored JavaScript can execute in the browser of users who view, preview, or approve the post, including editors and administrators.
Which shortcode input is vulnerable?
The product_id attribute of the [wc_product_dgallery] and [wc_product_dynamic_gallery] shortcodes is vulnerable. A crafted value can break out of the inline JavaScript variable declaration.