Skip to main content
Vulnerability Database/CVE-2025-24727

CVE-2025-24727: Contact Form Email Stored XSS Vulnerability

CVE-2025-24727 is a stored cross-site scripting flaw in Codepeople Contact Form Email plugin that enables attackers to inject malicious scripts. This post explains its impact, affected versions, and mitigation steps.

Published:

CVE-2025-24727 Overview

CVE-2025-24727 is a stored Cross-Site Scripting (XSS) vulnerability in the Codepeople Contact Form Email WordPress plugin (contact-form-to-email). The flaw affects all plugin versions up to and including 1.3.52. It stems from improper neutralization of user-supplied input during web page generation, classified under [CWE-79].

An attacker with high privileges can inject persistent JavaScript payloads that execute in the browsers of users who view affected pages. The vulnerability requires user interaction and can cross a security boundary, allowing script execution in a different context than the originating page.

Critical Impact

Authenticated attackers can store malicious scripts that execute in victim browsers, enabling session data theft, unauthorized actions, and potential administrative account compromise on affected WordPress sites.

Affected Products

  • Codepeople Contact Form Email plugin for WordPress
  • All versions from initial release through 1.3.52
  • WordPress sites using the contact-form-to-email plugin

Discovery Timeline

  • 2025-01-24 - CVE-2025-24727 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-24727

Vulnerability Analysis

The Contact Form Email plugin fails to properly sanitize and encode user-controlled input before rendering it within generated web pages. This behavior maps to CWE-79, Improper Neutralization of Input During Web Page Generation. When an authenticated administrator or high-privilege user submits crafted input through the plugin's configuration or form-builder interfaces, the payload is persisted in the WordPress database.

On subsequent page rendering, the stored data is emitted into HTML output without adequate encoding. Any embedded JavaScript then executes in the browser context of visitors who load the affected pages. Because the payload is stored server-side, exploitation persists across sessions until an administrator removes the malicious content or updates the plugin.

Root Cause

The root cause is missing or insufficient output encoding in the plugin's rendering routines. WordPress provides sanitization helpers such as esc_html(), esc_attr(), and wp_kses() for safely emitting user-supplied data. The affected plugin releases do not consistently apply these helpers to fields that reach the DOM, allowing HTML and script content to survive to rendering.

Attack Vector

Exploitation is network-based and requires an authenticated session with high privileges on the target site. The attacker submits a malicious payload through a plugin field that lacks sanitization. When a target user, such as another administrator or a site visitor viewing plugin-rendered output, loads the affected page, the payload executes. Successful execution can steal session cookies, forge administrative requests via CSRF chaining, or modify page content to phish credentials.

No verified public exploit code is available for this issue. Refer to the Patchstack Vulnerability Report for technical detail.

Detection Methods for CVE-2025-24727

Indicators of Compromise

  • Unexpected <script> tags, onerror=, or onload= attributes stored within plugin configuration entries or form definitions in the WordPress database.
  • Outbound requests from visitor browsers to unfamiliar domains originating from pages that render Contact Form Email plugin output.
  • New or modified administrative user accounts created shortly after authenticated visits to plugin-managed pages.

Detection Strategies

  • Audit the wp_options and plugin-specific tables for HTML entities or script payloads within Contact Form Email fields.
  • Review web server access logs for POST requests to plugin admin endpoints containing encoded script payloads or suspicious tag sequences.
  • Deploy a Content Security Policy (CSP) in report-only mode to surface inline script executions on pages rendered by the plugin.

Monitoring Recommendations

  • Enable WordPress audit logging to record plugin configuration changes and administrator activity.
  • Monitor endpoint telemetry from administrator workstations for anomalous browser-initiated requests following visits to the WordPress admin area.
  • Alert on file integrity changes within the wp-content/plugins/contact-form-to-email/ directory outside sanctioned update windows.

How to Mitigate CVE-2025-24727

Immediate Actions Required

  • Identify all WordPress installations running the Contact Form Email plugin at version 1.3.52 or earlier and inventory their exposure.
  • Restrict administrative access to trusted networks and enforce multi-factor authentication for all privileged WordPress accounts.
  • Review existing plugin configurations and forms for stored payloads and remove any content containing script tags or event handlers.

Patch Information

At the time of the NVD entry, versions through 1.3.52 are affected. Site operators should upgrade to a fixed release published by Codepeople once available and verify the installed version through the WordPress plugin management interface. Confirm the current status through the Patchstack Vulnerability Report.

Workarounds

  • Deactivate and remove the Contact Form Email plugin until a patched version is installed if immediate upgrade is not feasible.
  • Deploy a web application firewall (WAF) rule set that filters HTML and JavaScript payloads submitted to plugin administrative endpoints.
  • Enforce a strict Content Security Policy that blocks inline scripts and restricts script sources to trusted origins.
  • Limit the number of accounts with plugin configuration privileges to reduce the attack surface.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.