CVE-2025-13641

8.8 HIGH

📋 TL;DR

This vulnerability allows authenticated WordPress users with Contributor-level access or higher to include and execute arbitrary PHP files on the server via the 'template' shortcode parameter in NextGEN Gallery. This bypasses web server restrictions and can lead to information disclosure or code execution. All WordPress sites using NextGEN Gallery versions up to 3.59.12 are affected.

💻 Affected Systems

Products:
  • NextGEN Gallery - Photo Gallery, Sliders, Proofing and Themes for WordPress
Versions: All versions up to and including 3.59.12
Operating Systems: All operating systems running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with Contributor role or higher; affects all WordPress installations using vulnerable plugin versions.

⚠️ 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

Full server compromise through remote code execution if combined with file upload capabilities, leading to data theft, site defacement, or malware distribution.

🟠

Likely Case

Unauthorized access to sensitive files, privilege escalation within WordPress, and potential code execution in the WordPress context.

🟢

If Mitigated

Limited impact if proper access controls and file permissions are in place, though information disclosure may still occur.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access but is straightforward once credentials are obtained; weaponization is likely due to the critical nature and ease of exploitation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.59.13 or later

Vendor Advisory: https://plugins.trac.wordpress.org/changeset/3415575/nextgen-gallery/trunk/src/DisplayType/LegacyTemplateLocator.php?old=3004370&old_path=nextgen-gallery%2Ftrunk%2Fsrc%2FDisplayType%2FLegacyTemplateLocator.php

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find NextGEN Gallery and click 'Update Now'. 4. Verify update to version 3.59.13 or higher.

🔧 Temporary Workarounds

Restrict User Roles

all

Temporarily limit Contributor and higher roles or disable the plugin until patched.

🧯 If You Can't Patch

  • Disable the NextGEN Gallery plugin immediately.
  • Implement strict file permissions and monitor for suspicious file inclusion attempts.

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel under Plugins > Installed Plugins for NextGEN Gallery version 3.59.12 or lower.

Check Version:

wp plugin list --name=nextgen-gallery --field=version (if WP-CLI is installed)

Verify Fix Applied:

Confirm NextGEN Gallery version is 3.59.13 or higher in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file inclusion requests in web server logs, especially involving 'template' parameter with absolute paths.

Network Indicators:

  • HTTP requests with 'template' parameter containing absolute paths or unusual file extensions.

SIEM Query:

web_access_logs WHERE url CONTAINS 'template=' AND (url CONTAINS '/etc/' OR url CONTAINS 'C:\' OR url CONTAINS '.php')

🔗 References

📤 Share & Export