Dynamic Product Gallery for WooCommerce before 3.6.2 Stored XSS via Shortcode

State
Published
Severity
5.1 Medium
Published
Nov 23, 2026
Updated
Nov 28, 2026
Reserved
Nov 23, 2026

Read the record on cve.org

Description

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 product_id attribute of the [wc_product_dgallery] and [wc_product_dynamic_gallery] shortcodes. The parse_shortcode_product_dynamic_gallery() function passes product_id only through esc_attr(), and get_gallery_main() 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.

ProductVersions
Dynamic Product Gallery for WooCommerce Steve Trumanbefore 3.6.2 Affected

Weaknesses

  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.