WP Carousel Free <= 2.7.10 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'data-caption' Attribute

6.4
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE CVE-2026-4665
CVSS 6.4 (Medium)
Publicly Published May 4, 2026
Last Updated May 5, 2026
Researcher Webbernaut

Description

The WP Carousel Free plugin for WordPress is vulnerable to Stored Cross-Site Scripting via crafted fancybox `data-caption` attributes in all versions up to, and including, 2.7.10. This is due to the `fancybox-config.js` script reading the carousel container's `id` attribute directly from the DOM to construct a jQuery selector without sanitization. When a Contributor crafts an HTML block with a malformed carousel container ID (containing characters invalid for jQuery selectors), the custom fancybox configuration throws a JavaScript error and fails to initialize. This causes the bundled fancybox library (v3.5.7) to fall back to its default caption handling, which renders the `data-caption` attribute content as raw HTML. Since WordPress allows `data-*` attributes through `wp_kses_post()`, 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 clicks an image in the crafted carousel lightbox.

Learn more about Cross-Site Scripting vulnerabilities and how to prevent them.

References

Share

Vulnerability Details for Carousel, Slider, Photo Gallery with Lightbox, Video Slider, by WP Carousel

Software Type Plugin
Software Slug wp-carousel-free (view on wordpress.org)
Patched? Yes
Remediation Update to version 2.7.11, or a newer patched version
Affected Version
  • <= 2.7.10
Patched Version
  • 2.7.11

Recent vulnerabilities in Carousel, Slider, Photo Gallery with Lightbox, Video Slider, by WP Carousel

# Title CVE ID CVSS Researchers Date
1 Carousel, Slider, Gallery by WP Carousel <= 2.7.3 - Authenticated (Admin+) Stored Cross-Site Scripting CVE-2024-13314 4.4 Krugov Artyom January 31, 2025
2 Multiple Plugins <= (Various Versions) - Authenticated (Contributor+) Stored DOM-Based Cross-Site Scripting via FancyBox JavaScript Library CVE-2024-5020 6.4 Webbernaut December 3, 2024
3 Carousel, Slider, Gallery by WP Carousel <= 2.6.8 - Authenticated (Editor+) Stored Cross-Site Scripting CVE-2024-4002 4.4 Dmitrii Ignatyev October 30, 2024
4 Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce <= 2.6.3 - Authenticated (Admin+) PHP Object Injection CVE-2024-3020 7.2 hoanpk April 9, 2024
5 Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce <= 2.6.3 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'sp_wp_carousel_shortcode' CVE-2024-2949 6.4 Phuoc Pham (p3tl0v3r), Ngô Thiên An (ancorn_) April 5, 2024
6 Carousel, Slider, Gallery by WP Carousel <= 2.5.2 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode CVE-2022-4482 6.4 István Márton December 22, 2022

Did you know Wordfence Intelligence provides free personal and commercial API access to our comprehensive WordPress vulnerability database, along with a free webhook integration to stay on top of the latest vulnerabilities added and updated in the database? Get started today!

Learn more

Want to get notified of the latest vulnerabilities that may affect your WordPress site?
Install Wordfence on your site today to get notified immediately if your site is affected by a vulnerability that has been added to our database.

Get Wordfence

The Wordfence Intelligence WordPress vulnerability database is completely free to access and query via API. Please review the documentation on how to access and consume the vulnerability data via API.

Documentation