CVE-2021-25080
Medium · 6.1CVSS
6.1
EPSS
84.2%
Published
Jan 24, 2022
CISA due date
—
Cloudanix analysis
A vulnerable WordPress form plugin can let an attacker hide malicious code in a form submission that runs when an administrator views it.
- Exploitation
- Requires User Interaction
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Application
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
CVE-2021-25080 is a stored cross-site scripting vulnerability in the Contact Form Entries WordPress plugin before version 1.1.7. The plugin trusts attacker-controlled HTTP header values such as CLIENT-IP and X-FORWARDED-FOR, records them as the submitter IP address, and later renders them in the WordPress admin interface without proper validation, sanitization, or output escaping. An unauthenticated attacker can submit a form entry containing JavaScript in those headers; when a logged-in administrator views the entry, the script executes in the administrator’s browser session. This can enable theft of admin-session-accessible data, nonce harvesting, unauthorized administrative actions, plugin/theme modification, creation of new administrator users, or further compromise depending on WordPress permissions and installed components.
Why it matters to the business
Successful exploitation can turn a routine form submission into a compromise path for the WordPress administrative panel. If an administrator views the malicious entry, attackers may be able to perform actions as that administrator, alter site content, inject malicious scripts, create persistence, redirect visitors, or use the site for phishing and malware delivery. Although this flaw is not listed in CISA KEV, the EPSS score is high and public exploit capability is available, so exposed sites running vulnerable plugin versions should be treated as likely targets, especially because WordPress plugins are commonly scanned at internet scale.
How an attack unfolds
An attacker first identifies a WordPress site using the vulnerable Contact Form Entries plugin. They submit a public-facing contact form or otherwise generate an entry handled by the plugin, but include a crafted CLIENT-IP, X-FORWARDED-FOR, or similar forwarding header containing an XSS payload instead of a valid IP address. The plugin stores this unsanitized value as part of the contact form entry metadata. Later, a logged-in WordPress administrator reviews submitted entries in the plugin’s admin pages. Because the stored header value is rendered without safe escaping, the JavaScript payload executes in the administrator’s authenticated browser context. From there, the attacker’s script can read page content available to the admin, capture WordPress nonces, make authenticated AJAX or admin requests, add a new privileged user, modify plugin/theme files where permitted, inject persistent malicious content, or redirect the admin to a credential capture page.
How to fix it
Upgrade the Contact Form Entries WordPress plugin to version 1.1.7 or later. If an upgrade is not immediately possible, disable and remove the plugin until it can be updated, or restrict access to the plugin’s entry-management pages to only trusted administrators. At the web server, reverse proxy, WAF, or CDN layer, normalize or drop untrusted CLIENT-IP and X-FORWARDED-FOR headers from direct internet clients and only accept forwarding headers from trusted proxy IP ranges. Treat header filtering as a compensating control only; the durable fix is to run a patched plugin version that validates IP values and escapes output in admin views. Review administrator accounts and recent WordPress changes after patching if the plugin was exposed while vulnerable.
How to confirm the fix worked
Confirm the installed Contact Form Entries plugin version is 1.1.7 or later from the WordPress plugin inventory, filesystem metadata, or WP-CLI. Using WP-CLI, verify with `wp plugin list` and check that the plugin associated with Contact Form Entries is not below 1.1.7. Validate that no public-facing form submission flow stores raw JavaScript from CLIENT-IP or X-FORWARDED-FOR into entries. In a controlled test environment only, submit a benign payload such as `<script>alert(1)</script>` in X-FORWARDED-FOR and confirm that it is either rejected, normalized to a valid IP address, or displayed as escaped text rather than executed in the admin entry view. Also verify proxy/WAF configuration so client-supplied forwarding headers cannot override trusted source IP handling.
Typical attack path
- Scan for WordPress sites using the Contact Form Entries plugin, especially versions earlier than 1.1.7.
- Locate a public form that creates entries visible in the WordPress admin interface.
- Submit a form request with a malicious JavaScript payload in CLIENT-IP, X-FORWARDED-FOR, or another IP-forwarding header consumed by the plugin.
- Wait for a logged-in administrator or privileged user to view the submitted entry in the WordPress dashboard.
- Execute JavaScript in the administrator’s browser session when the entry is rendered.
- Use the administrator’s session to perform unauthorized WordPress actions, such as stealing nonces, changing settings, creating users, modifying content, or planting additional persistence.
How to detect it
Look for evidence of malicious JavaScript submitted through IP-related HTTP headers and later viewed in the WordPress admin area. Relevant log sources include web server access logs, CDN/WAF logs, reverse proxy logs, WordPress application logs if enabled, security plugin logs, database backups containing form entries, and WordPress admin audit logs. Search for CLIENT-IP, X-FORWARDED-FOR, X-Real-IP, Forwarded, CF-Connecting-IP, True-Client-IP, or similar headers containing HTML or JavaScript tokens such as `<script`, `onerror=`, `onload=`, `javascript:`, `document.cookie`, `wpnonce`, `admin-ajax.php`, or encoded variants. Correlate suspicious form submissions with subsequent administrator visits to Contact Form Entries admin pages and with unexpected authenticated actions shortly afterward, such as creation of administrator accounts, plugin/theme file edits, changes to `siteurl` or `home`, new redirects, injected posts/pages, or unfamiliar options. Because this is stored XSS, exploitation may not appear as an immediate server-side error; the key pattern is malicious header content stored in an entry followed by privileged WordPress activity from an administrator session.
- CLIENT-IP: <script
- Client-IP: <script
- X-FORWARDED-FOR: <script
- X-Forwarded-For: <script
- X-Real-IP: <script
- Forwarded: <script
- CF-Connecting-IP: <script
- True-Client-IP: <script
- X-FORWARDED-FOR: javascript:
- X-Forwarded-For: javascript:
- CLIENT-IP: javascript:
- Client-IP: javascript:
- X-FORWARDED-FOR: onerror=
- X-Forwarded-For: onerror=
- CLIENT-IP: onerror=
- Client-IP: onerror=
- X-FORWARDED-FOR: onload=
- X-Forwarded-For: onload=
- CLIENT-IP: onload=
- Client-IP: onload=
- X-FORWARDED-FOR: document.cookie
- X-Forwarded-For: document.cookie
- CLIENT-IP: document.cookie
- Client-IP: document.cookie
- X-FORWARDED-FOR: wpnonce
- X-Forwarded-For: wpnonce
- CLIENT-IP: wpnonce
- Client-IP: wpnonce
- %3Cscript
- %3C%2Fscript%3E
- javascript%3A
- onerror%3D
- onload%3D
- /wp-admin/admin-ajax.php
- /wp-admin/plugin-editor.php
- /wp-admin/theme-editor.php
- /wp-admin/user-new.php
What your security team should do
- Prioritize updating or removing the Contact Form Entries WordPress plugin on all internet-facing WordPress sites; target version 1.1.7 or later.
- Inventory WordPress installations for the plugin name, slug, and version, including inactive plugin copies that remain on disk.
- Search recent web access logs for form submissions containing script-like content in CLIENT-IP, X-FORWARDED-FOR, X-Real-IP, Forwarded, or similar headers.
- Review WordPress administrator activity after suspicious form submissions, including new users, role changes, plugin/theme edits, option changes, and unexpected posts or redirects.
- Limit WordPress administrator access using MFA, least privilege, and IP-based access controls where operationally feasible.
- Configure reverse proxies, CDNs, and web servers to strip or overwrite untrusted forwarding headers and accept them only from trusted proxy infrastructure.
- Add WAF/SIEM detections for JavaScript metacharacters in IP-related HTTP headers on requests to WordPress form endpoints.
- If exploitation is suspected, rotate administrator passwords and WordPress authentication salts, revoke active sessions, and inspect plugin/theme files for unauthorized modifications.
The record
The Contact Form Entries WordPress plugin before 1.1.7 does not validate, sanitise and escape the IP address retrieved via headers such as CLIENT-IP and X-FORWARDED-FOR, allowing unauthenticated attackers to perform Cross-Site Scripting attacks against logged in admins viewing the created entry
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-96379 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96382 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96368 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96361 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96362 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96360 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96357 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96358 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79