CVE-2025-60104

5.9 MEDIUM

📋 TL;DR

This stored cross-site scripting (XSS) vulnerability in the WordPress Gallery Custom Links plugin allows attackers to inject malicious scripts into web pages. When users view affected pages, the scripts execute in their browsers, potentially stealing session cookies or performing actions on their behalf. All WordPress sites using Gallery Custom Links versions up to 2.2.5 are affected.

💻 Affected Systems

Products:
  • WordPress Gallery Custom Links plugin
Versions: n/a through 2.2.5
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: WordPress multisite installations are also affected. The vulnerability exists in how the plugin handles user input for gallery custom links.

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

Attackers could steal administrator session cookies, take over WordPress sites, deface websites, or redirect visitors to malicious sites.

🟠

Likely Case

Attackers inject malicious scripts that steal user session data or credentials when users view gallery pages with custom links.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts are neutralized before reaching users' browsers.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires the ability to create or modify gallery custom links, which typically requires contributor-level access or higher. The vulnerability is stored/persistent, affecting all users who view the compromised pages.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after 2.2.5

Vendor Advisory: https://patchstack.com/database/wordpress/plugin/gallery-custom-links/vulnerability/wordpress-gallery-custom-links-plugin-2-2-5-cross-site-scripting-xss-vulnerability?_s_id=cve

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find Gallery Custom Links plugin. 4. Click 'Update Now' if update is available. 5. If no update appears, manually download latest version from WordPress repository and replace plugin files.

🔧 Temporary Workarounds

Disable plugin temporarily

WordPress

Deactivate the Gallery Custom Links plugin until patched

wp plugin deactivate gallery-custom-links

Implement WAF rules

all

Configure web application firewall to block XSS payloads in gallery custom links

🧯 If You Can't Patch

  • Remove plugin entirely and use alternative gallery solutions
  • Implement strict content security policy (CSP) headers to mitigate script execution

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin > Plugins > Installed Plugins for Gallery Custom Links version. If version is 2.2.5 or earlier, you are vulnerable.

Check Version:

wp plugin get gallery-custom-links --field=version

Verify Fix Applied:

After updating, verify plugin version shows higher than 2.2.5. Test gallery custom links functionality to ensure it still works properly.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to gallery custom links endpoints
  • Suspicious JavaScript payloads in gallery link parameters
  • Multiple failed attempts to inject scripts

Network Indicators:

  • HTTP requests containing script tags in gallery link parameters
  • Unusual outbound connections from gallery pages

SIEM Query:

source="wordpress.log" AND "gallery-custom-links" AND ("script" OR "javascript:" OR "onclick" OR "onload")

🔗 References

📤 Share & Export