CVE-2025-58653

6.5 MEDIUM

📋 TL;DR

This stored cross-site scripting (XSS) vulnerability in the JSM file_get_contents() Shortcode WordPress plugin allows attackers to inject malicious scripts into web pages. When exploited, these scripts execute in victims' browsers, potentially stealing session cookies or performing actions as authenticated users. All WordPress sites using vulnerable versions of this plugin are affected.

💻 Affected Systems

Products:
  • JSM file_get_contents() Shortcode WordPress Plugin
Versions: n/a through 2.7.1
Operating Systems: All operating systems running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: WordPress sites with the vulnerable plugin installed and activated 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

Attackers could steal administrator session cookies, take over WordPress sites, deface websites, or install backdoors for persistent access.

🟠

Likely Case

Attackers inject malicious JavaScript to steal user session cookies, redirect visitors to phishing sites, or perform actions as authenticated users.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires the ability to inject malicious input that gets stored and later displayed without proper sanitization.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after 2.7.1

Vendor Advisory: https://patchstack.com/database/wordpress/plugin/wp-file-get-contents/vulnerability/wordpress-jsm-file-get-contents-shortcode-plugin-2-7-1-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 'JSM file_get_contents() Shortcode'. 4. Click 'Update Now' if available. 5. Alternatively, download latest version from WordPress repository and replace plugin files.

🔧 Temporary Workarounds

Disable vulnerable plugin

all

Temporarily deactivate the plugin until patched

Implement Content Security Policy

all

Add CSP headers to restrict script execution sources

Header set Content-Security-Policy "default-src 'self'; script-src 'self'" in .htaccess or web server config

🧯 If You Can't Patch

  • Remove the plugin entirely if functionality is not critical
  • Implement web application firewall (WAF) rules to block XSS payloads

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin → Plugins → Installed Plugins for 'JSM file_get_contents() Shortcode' version 2.7.1 or earlier

Check Version:

wp plugin list --name='jsm-file-get-contents-shortcode' --field=version (if WP-CLI installed)

Verify Fix Applied:

Verify plugin version is higher than 2.7.1 in WordPress admin panel

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests containing script tags to plugin endpoints
  • Multiple failed XSS attempts in web server logs

Network Indicators:

  • HTTP requests with suspicious script payloads in parameters
  • Unexpected JavaScript execution from plugin URLs

SIEM Query:

source="web_server" AND ("file_get_contents" OR "jsm") AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=")

🔗 References

📤 Share & Export