WordPress has become the go-to platform for many website owners and developers for its ease of use, countless plugins, and a plethora of themes. However, it's not all sunshine and rainbows for this popular content management system (CMS). Recently, a critical security vulnerability has been identified in the WordPress plugin called WP Image Slideshow, which poses a severe risk to website owners who are using this plugin on their sites. The issue at hand is an SQL Injection vulnerability (CVE-2023-5438) that could result in sensitive data leaks and even website compromise if left unaddressed.

How Does the Vulnerability Work?

The WP Image Slideshow plugin for WordPress suffers from an SQL injection vulnerability due to a lack of sufficient input validation and sanitization applied to the shortcode parameter within the plugin. This vulnerability allows authenticated attackers, with subscriber-level or higher permissions, to inject malicious SQL queries into the existing SQL queries used by the plugin.

By exploiting this vulnerability, the attacker can potentially extract sensitive information from the database, such as passwords, email addresses, or other valuable data. The impact of this flaw can be far-reaching, and the severity depends on the level of access the attacker might gain.

Affected Versions

All versions of the WP Image Slideshow plugin up to, and including, version 12. are vulnerable to this SQL Injection attack.

An example of the vulnerable shortcode is given below

[wp_image_slideshow number_of_slides="3")

The SQL query used by the plugin that makes it vulnerable to injection looks like this

$sql = "SELECT * FROM {$wpdb->prefix}slide_table WHERE active = '1' AND displayed = '1' ORDER BY id DESC LIMIT " . $number_of_slides;

Exploit Details

To exploit this vulnerability, an attacker with access to create or edit a post can simply inject an additional SQL query into the number_of_slides parameter in the shortcode. This could look like:

[wp_image_slideshow number_of_slides="3; DROP TABLE users; -- ")

As a result, the attacker can potentially extract sensitive information or manipulate the website's database to their advantage.

Original References

The vulnerability was originally reported by a reputable security researcher who responsibly disclosed the issue to the WP Image Slideshow developers. The original proof of concept, as well as a more in-depth technical explanation of the vulnerability, can be found here:

Mitigation Steps

The developers of the WP Image Slideshow plugin have released a patched version (12.1) that addresses the vulnerability. Website owners should update their plugin as soon as possible to protect their websites from this critical security issue. To do so, navigate to the Plugins section on your WordPress admin dashboard, find the WP Image Slideshow plugin, and click on "Update Now."


This SQL Injection vulnerability in the WP Image Slideshow plugin for WordPress serves as a stark reminder of the importance of proper input validation and sanitization, particularly for web applications and plugins with vast user bases. It is crucial for WordPress site owners to ensure that they keep their plugins and themes up to date to avoid becoming victims of cyber attacks resulting from unpatched vulnerabilities.


Published on: 10/31/2023 09:15:00 UTC
Last modified on: 11/07/2023 04:24:00 UTC