CVE-2025-22761

6.5 MEDIUM

📋 TL;DR

This stored XSS vulnerability in the Ajax Contact Form WordPress plugin allows attackers to inject malicious scripts into web pages that persist in the database. When users view pages containing the injected scripts, the attacker can steal session cookies, redirect users, or perform actions on their behalf. All WordPress sites using Ajax Contact Form versions up to 1.2.5.1 are affected.

💻 Affected Systems

Products:
  • Ajax Contact Form WordPress Plugin
Versions: n/a through 1.2.5.1
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: All installations with vulnerable versions are affected regardless of configuration.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator session cookies, take over WordPress sites, install backdoors, deface websites, or redirect visitors to malicious sites.

🟠

Likely Case

Attackers inject malicious JavaScript to steal user session cookies, potentially compromising user accounts and performing unauthorized actions.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts would be neutralized before being stored or displayed.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Stored XSS vulnerabilities in WordPress plugins are commonly exploited. The contact form functionality likely allows unauthenticated users to submit malicious payloads.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after 1.2.5.1

Vendor Advisory: https://patchstack.com/database/wordpress/plugin/fws-ajax-contact-form/vulnerability/wordpress-ajax-contact-form-plugin-ajax-contact-form-1-2-5-1-stored-cross-site-scripting-xss-vulnerability?_s_id=cve

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find Ajax Contact Form. 4. Click 'Update Now' if available. 5. If no update appears, deactivate and delete the plugin, then install the latest version from WordPress repository.

🔧 Temporary Workarounds

Disable Ajax Contact Form Plugin

all

Temporarily disable the vulnerable plugin until patched

wp plugin deactivate ajax-contact-form

Implement WAF Rules

all

Add web application firewall rules to block XSS payloads in contact form submissions

🧯 If You Can't Patch

  • Disable the Ajax Contact Form plugin immediately
  • Implement strict Content Security Policy (CSP) headers to mitigate XSS impact

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > Installed Plugins for Ajax Contact Form version. If version is 1.2.5.1 or earlier, you are vulnerable.

Check Version:

wp plugin get ajax-contact-form --field=version

Verify Fix Applied:

After updating, verify the plugin version is higher than 1.2.5.1 in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • Unusual contact form submissions with script tags or JavaScript code
  • Multiple failed contact form submissions with similar payloads

Network Indicators:

  • HTTP POST requests to contact form endpoints containing script tags or JavaScript

SIEM Query:

source="wordpress.log" AND "contact-form" AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=")

🔗 References

📤 Share & Export