Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-13112 Overview
CVE-2024-13112 is a Reflected Cross-Site Scripting (XSS) vulnerability affecting the WP MediaTagger WordPress plugin through version 4.1.1. The plugin fails to sanitise and escape a parameter before outputting it back in the page. Attackers can craft a malicious URL and trick authenticated users into executing arbitrary JavaScript in their browser context. The vulnerability targets high-privilege users such as site administrators, enabling session theft, account takeover, or injection of persistent backdoors into the WordPress installation. The flaw is categorised under CWE-79: Improper Neutralization of Input During Web Page Generation.
Critical Impact
Successful exploitation against a WordPress administrator can lead to full site compromise through arbitrary JavaScript execution in the admin session.
Affected Products
- WP MediaTagger WordPress plugin versions up to and including 4.1.1
- Vendor: phd38
- WordPress installations with the plugin active and accessible to administrative users
Discovery Timeline
- 2025-01-31 - CVE-2024-13112 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-13112
Vulnerability Analysis
The WP MediaTagger plugin processes a user-controlled parameter and reflects its value directly into the HTML response. Because the plugin does not apply WordPress sanitisation functions such as esc_html(), esc_attr(), or sanitize_text_field(), attacker-supplied markup renders inside the DOM. When a logged-in administrator loads a crafted URL, the injected script executes with the privileges of that session.
Reflected XSS requires user interaction, typically through a phishing link or embedded iframe on an attacker-controlled page. The scope change in the attack vector indicates that executed script can affect resources beyond the vulnerable component, including the WordPress admin interface and REST API endpoints authenticated by the victim's cookies.
Root Cause
The root cause is missing output encoding on a request parameter processed by the plugin. WordPress plugins must escape data at the point of output using context-appropriate functions. The failure to apply these controls allows HTML and JavaScript characters to pass unmodified into the rendered page.
Attack Vector
An attacker constructs a URL pointing to a vulnerable plugin endpoint with a JavaScript payload embedded in the affected parameter. The attacker delivers this URL to an authenticated administrator through email, chat, or a web page. When the administrator clicks the link, the browser renders the attacker's payload. The script can create new administrator accounts, modify plugin files, exfiltrate nonces, or pivot to installing malicious plugins. See the WPScan Vulnerability Reference for additional technical detail.
Detection Methods for CVE-2024-13112
Indicators of Compromise
- HTTP request logs containing <script>, javascript:, or encoded payload fragments in query parameters sent to WP MediaTagger endpoints
- Unexpected administrator accounts created in wp_users without a corresponding audit trail
- Outbound requests from the WordPress server or admin browser session to unknown domains following a plugin page load
Detection Strategies
- Inspect web server access logs for GET requests to WP MediaTagger URLs that contain HTML entities, %3Cscript%3E, or onerror= patterns
- Deploy a Web Application Firewall (WAF) rule set that flags reflected XSS payloads in WordPress plugin parameters
- Review WordPress audit logs for privilege changes, new user registrations, and plugin installations correlated with administrator sessions
Monitoring Recommendations
- Enable verbose logging for the /wp-admin/ path and all plugin query string parameters
- Monitor the wp_options and wp_users tables for unauthorised modifications
- Alert on administrator sessions originating from new IP addresses or user agents
How to Mitigate CVE-2024-13112
Immediate Actions Required
- Deactivate the WP MediaTagger plugin until a patched version is confirmed by the vendor
- Audit all administrator accounts and revoke sessions by rotating authentication keys and salts in wp-config.php
- Instruct administrators to avoid clicking unverified links while authenticated to the WordPress admin console
Patch Information
No vendor patch has been published in the referenced advisory. The vulnerability affects all versions up to and including 4.1.1. Monitor the WPScan Vulnerability Reference and the WordPress plugin repository for updated releases from vendor phd38.
Workarounds
- Remove the WP MediaTagger plugin from production WordPress installations and replace it with a maintained alternative
- Deploy a WAF with reflected XSS signatures that block script tags and event handler attributes in query strings
- Enforce a strict Content Security Policy (CSP) that disallows inline scripts in the WordPress admin interface
# Disable the vulnerable plugin via WP-CLI
wp plugin deactivate wp-mediatagger
wp plugin delete wp-mediatagger
# Rotate authentication salts to invalidate active sessions
wp config shuffle-salts
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

