CVE-2024-13676

6.5 MEDIUM

📋 TL;DR

This SQL injection vulnerability in the WordPress Categorized Gallery Plugin allows authenticated attackers with Contributor-level access or higher to inject malicious SQL queries through the 'field' attribute in shortcodes. Attackers can extract sensitive information from the database, including user credentials and other confidential data. All WordPress sites using this plugin up to version 2.0 are affected.

💻 Affected Systems

Products:
  • WordPress Categorized Gallery Plugin
Versions: All versions up to and including 2.0
Operating Systems: All operating systems running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires Contributor-level or higher WordPress user role for exploitation. All WordPress installations with vulnerable plugin versions are affected regardless of configuration.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to credential theft, data exfiltration, privilege escalation, and potential site takeover.

🟠

Likely Case

Extraction of sensitive user data, admin credentials, and plugin configuration information from the database.

🟢

If Mitigated

Limited impact if proper input validation and parameterized queries are implemented, restricting data access to authorized users only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access but uses simple SQL injection techniques. The vulnerability is well-documented with public references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.1 or later

Vendor Advisory: https://plugins.trac.wordpress.org/browser/categorized-gallery/trunk/init.php#L177

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find 'Categorized Gallery Plugin'. 4. Click 'Update Now' if update is available. 5. Alternatively, download version 2.1+ from WordPress plugin repository and manually update.

🔧 Temporary Workarounds

Disable vulnerable shortcode

all

Remove or disable the 'image_gallery' shortcode functionality to prevent exploitation.

Add to theme functions.php: remove_shortcode('image_gallery');

Input validation filter

all

Add input validation for the 'field' parameter before processing.

Add to theme functions.php: add_filter('shortcode_atts_image_gallery', 'validate_gallery_field', 10, 3); function validate_gallery_field($out, $pairs, $atts) { if(isset($atts['field']) && !preg_match('/^[a-zA-Z0-9_]+$/', $atts['field'])) { $atts['field'] = ''; } return $atts; }

🧯 If You Can't Patch

  • Remove Contributor and higher role access from untrusted users
  • Implement web application firewall (WAF) rules to block SQL injection patterns

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel → Plugins → Installed Plugins for 'Categorized Gallery Plugin' version 2.0 or lower.

Check Version:

wp plugin list --name='Categorized Gallery Plugin' --field=version

Verify Fix Applied:

Confirm plugin version is 2.1 or higher in WordPress admin panel and test shortcode functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual database queries from WordPress users
  • Multiple failed SQL queries with malformed parameters
  • Suspicious POST requests containing 'field' parameter with SQL syntax

Network Indicators:

  • HTTP requests with SQL keywords in 'field' parameter
  • Unusual database connection patterns from web server

SIEM Query:

source="wordpress.log" AND ("image_gallery" OR "field=") AND ("UNION" OR "SELECT" OR "FROM" OR "WHERE" OR "--" OR "' OR '")

🔗 References

📤 Share & Export