CVE-2025-4585
Executive Summary
CVE-2025-4585 is a Stored Cross-Site Scripting (XSS) vulnerability in the IRM Newsroom plugin for WordPress, affecting all versions up to and including 1.2.19. The flaw resides in the irmflat shortcode, where user-supplied attributes are not properly sanitized or escaped. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts. When a victim (including administrators) visits the compromised page, the script executes in their browser, potentially leading to session hijacking, defacement, or further privilege escalation.
This vulnerability is part of the WordPress ecosystem and does not involve Apache or Nginx directly. The plugin is developed by Irm and is not currently patched. No public exploit code or proof-of-concept is available, but the risk is elevated due to the low complexity and authenticated attack vector.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This is a WordPress plugin vulnerability. The plugin is distributed via the WordPress plugin repository and can be installed directly from the WordPress admin dashboard. Users should verify the integrity of the plugin file by checking its checksum against the official repository. No known supply chain compromise has been reported, but the lack of a patch increases the risk of malicious actors forking or modifying the plugin.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – contributor-level access
- User Interaction: None (UI:N)
- Scope: Changed (S:C) – the vulnerability can affect resources beyond the vulnerable component
- Confidentiality Impact: Low (C:L) – limited data exposure
- Integrity Impact: Low (I:L) – limited modification of content
- Availability Impact: None (A:N)
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the potential for stored XSS to affect all users (including admins) makes it a significant risk for multi-user WordPress sites.
Deep Dive & Mechanics
The vulnerability exists in the irmflat shortcode provided by the IRM Newsroom plugin. Shortcodes in WordPress are parsed by the do_shortcode() function, which processes attributes passed by the user. In this case, the plugin fails to properly sanitize and escape the attributes before outputting them in the page HTML.
Root Cause: The plugin uses shortcode_atts() to merge user-supplied attributes with defaults, but then directly outputs the attribute values without passing them through esc_attr() or wp_kses(). This allows an attacker to inject JavaScript code into attributes like class, style, or custom data attributes.
Attack Flow:
- An authenticated user with contributor-level access creates or edits a post/page.
- The user inserts the
[irmflat]shortcode with a malicious attribute, e.g.,[irmflat class="xss" onmouseover="alert(1)"]. - The plugin renders the shortcode, outputting the unescaped attribute into the HTML.
- When any user (including administrators) views the page, the injected script executes.
Why Stored XSS is Dangerous: Unlike reflected XSS, the malicious payload is stored in the database and executed every time the page is loaded. This can lead to persistent defacement, cookie theft, or privilege escalation if an admin views the page.
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code pattern. The vulnerable code likely resembles:
// Vulnerable code (conceptual)
function irmflat_shortcode($atts) {
$atts = shortcode_atts(array(
'class' => '',
'style' => '',
), $atts);
// Direct output without escaping
return '<div class="' . $atts['class'] . '" style="' . $atts['style'] . '">Content</div>';
}
A patched version would use proper escaping:
// Patched code (conceptual)
function irmflat_shortcode($atts) {
$atts = shortcode_atts(array(
'class' => '',
'style' => '',
), $atts);
// Escape attributes before output
return '<div class="' . esc_attr($atts['class']) . '" style="' . esc_attr($atts['style']) . '">Content</div>';
}
The key difference is the use of esc_attr() to neutralize any HTML or JavaScript injection attempts.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with IRM Newsroom plugin <= 1.2.19
- Authenticated user with contributor-level access or higher
Exploitation Steps:
- Log in as a contributor.
- Create a new post or edit an existing one.
- Switch to the Text/HTML editor.
- Insert the following shortcode with a malicious attribute:
[irmflat class="xss" onmouseover="alert(document.cookie)"] - Publish or update the post.
- When any user visits the post, the script executes (e.g., on mouseover).
Advanced Payload Example:
[irmflat style="x:expression(alert(1))"] <!-- IE legacy -->
[irmflat class="xss" onfocus="alert(1)" autofocus] <!-- auto-trigger -->
Note: No public exploit code is available, so this is a conceptual demonstration.
Blue Team (Detection & Response)
Detection Steps:
- Monitor for posts containing the
[irmflat]shortcode with unusual attributes (e.g.,onmouseover,onfocus,javascript:). - Review WordPress database for stored XSS payloads in
wp_posts.post_content. - Use web application firewall (WAF) rules to block common XSS patterns in shortcode attributes.
Response:
- Immediately disable the IRM Newsroom plugin if no patch is available.
- Remove any malicious posts or pages containing the injected shortcode.
- Reset passwords for affected users (especially administrators who may have viewed the malicious page).
- Audit user roles and remove unnecessary contributor-level access.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/irm-newsroom/(entire plugin directory) - Database: Posts containing
[irmflatwith suspicious attributes likeon*=orjavascript: - Logs: WordPress debug log entries showing
do_shortcodeerrors or unexpected HTML output - Network: Outbound connections from the WordPress server to known malicious domains (if the payload exfiltrates data)
Detection Engineering
YARA Rule
rule CVE_2025_4585_IRM_Newsroom_XSS {
meta:
description = "Detects stored XSS payloads targeting CVE-2025-4585 in IRM Newsroom plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-4585"
strings:
$shortcode = /\[irmflat\s+[^\]]*?(on\w+\s*=|javascript\s*:)/i
$payload = /<script[^>]*>.*?<\/script>/i
condition:
$shortcode or $payload
}
Sigma Rule
title: CVE-2025-4585 IRM Newsroom Stored XSS
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to exploit stored XSS in IRM Newsroom plugin via shortcode attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-admin/post.php"
http.body|contains: "[irmflat"
http.body|re: (on\w+\s*=|javascript\s*:)
condition: selection
falsepositives:
- Legitimate use of shortcode with safe attributes
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-4585 IRM Newsroom Stored XSS Attempt"; flow:to_server; content:"[irmflat"; http_client_body; pcre:"/(on\w+\s*=|javascript\s*:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Remove any malicious content from the database (posts/pages containing the vulnerable shortcode).
- Review and restrict user roles – only grant contributor access to trusted users.
Long-term Fix:
- The vendor (Irm) must release a patched version that properly escapes shortcode attributes using
esc_attr()orwp_kses(). - Alternatively, consider replacing the plugin with a more secure alternative.
Workaround:
- Implement a WAF rule to block shortcode attributes containing
on*=orjavascript:. - Use a WordPress security plugin that monitors for XSS payloads in post content.
Valters IT Signature This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact threatintel@valters.it.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.