CVE-2017-1002014

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to perform blind SQL injection attacks through the gallery_name parameter in the image-gallery-with-slideshow WordPress plugin. Attackers can potentially extract sensitive database information, modify data, or execute administrative operations. All WordPress sites running the vulnerable plugin version are affected.

💻 Affected Systems

Products:
  • WordPress image-gallery-with-slideshow plugin
Versions: v1.5.2 and possibly earlier versions
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires plugin to be installed and activated on WordPress site. Admin panel access may be required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, privilege escalation, site defacement, or remote code execution via database functions.

🟠

Likely Case

Extraction of sensitive WordPress data including user credentials, plugin settings, and potentially other database contents.

🟢

If Mitigated

Limited impact due to proper input validation, database user privilege restrictions, and web application firewall rules.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to admin interface. SQL injection is blind but can be automated with tools like sqlmap.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.5.3 or later

Vendor Advisory: https://wordpress.org/plugins/image-gallery-with-slideshow/

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find 'Image Gallery with Slideshow'. 4. Click 'Update Now' if available. 5. Alternatively, delete and reinstall latest version from WordPress repository.

🔧 Temporary Workarounds

Disable vulnerable plugin

all

Temporarily disable the plugin until patched version is available

wp plugin deactivate image-gallery-with-slideshow

Web Application Firewall rule

all

Block SQL injection patterns targeting gallery_name parameter

ModSecurity rule: SecRule ARGS:gallery_name "@detectSQLi" "id:1002014,phase:2,deny,status:403"

🧯 If You Can't Patch

  • Remove plugin entirely and use alternative gallery solution
  • Implement strict input validation and parameterized queries in custom code

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin → Plugins → Installed Plugins for image-gallery-with-slideshow version 1.5.2 or earlier

Check Version:

wp plugin get image-gallery-with-slideshow --field=version

Verify Fix Applied:

Verify plugin version is 1.5.3 or later in WordPress admin panel

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts to admin panel
  • Requests to admin_setting.php with suspicious gallery_name parameters

Network Indicators:

  • HTTP POST requests to */wp-admin/admin_setting.php with SQL injection patterns in parameters

SIEM Query:

source="web_logs" AND uri="*admin_setting.php*" AND (gallery_name="*' OR*" OR gallery_name="*UNION*" OR gallery_name="*SELECT*" OR gallery_name="*--*" OR gallery_name="*/*")

🔗 References

📤 Share & Export