CVE-2026-9125

The Ultimate Video Player For WordPress <= 4.2.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'link_url' Shortcode Attribute

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.4
CVSS Score
6.4
CVSS Score
medium
Severity
4.2.1
Patched in
1d
Time to patch

Description

The Presto Player plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'link_url' parameter of the [presto_player_overlay] shortcode in versions up to, and including, 4.2.0 This is due to insufficient input sanitization and output escaping in the getOverlays() function, which copies the link_url shortcode attribute directly into the overlay configuration without scheme validation, allowing javascript: URIs to survive and be rendered as the href of a clickable anchor element by the presto-dynamic-overlay-ui web component. 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:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=4.2.0
PublishedJune 11, 2026
Last updatedJune 12, 2026
Affected pluginpresto-player

What Changed in the Fix

Changes introduced in v4.2.1

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

This research plan outlines the technical steps to analyze and exploit **CVE-2026-9125**, a Stored Cross-Site Scripting (XSS) vulnerability in the Presto Player plugin for WordPress. ## 1. Vulnerability Summary The **Presto Player** plugin (versions <= 4.2.0) contains a Stored XSS vulnerability wit…

Show full research plan

This research plan outlines the technical steps to analyze and exploit CVE-2026-9125, a Stored Cross-Site Scripting (XSS) vulnerability in the Presto Player plugin for WordPress.

1. Vulnerability Summary

The Presto Player plugin (versions <= 4.2.0) contains a Stored XSS vulnerability within the [presto_player_overlay] shortcode. The vulnerability arises because the link_url attribute is processed by the getOverlays() function (inferred PHP logic) and passed to the frontend without sufficient sanitization or scheme validation (e.g., failing to use esc_url()). Specifically, javascript: URIs are permitted to persist and are rendered as the href attribute of an anchor element within the presto-dynamic-overlay-ui web component. An attacker with Contributor-level privileges can inject malicious scripts that execute when a user clicks the affected overlay.

2. Attack Vector Analysis

  • Shortcode: [presto_player_overlay]
  • Vulnerable Attribute: link_url
  • Payload Type: javascript: protocol URI.
  • Authentication: Authenticated (Contributor or higher).
  • Precondition: The attacker must be able to create or edit a post/page and insert shortcodes.
  • Endpoint: Post creation/update via Gutenberg editor (REST API) or Classic Editor.
  • Sink: The href attribute of a clickable anchor tag in the presto-dynamic-overlay-ui component.

3. Code Flow (Inferred)

  1. Registration: The plugin registers the [presto_player_overlay] shortcode using add_shortcode.
  2. Parsing: When a page containing the shortcode is rendered, the callback function (likely involving getOverlays()) parses the attributes.
  3. Storage/Transfer: The raw link_url value is stored in a configuration object or passed as a property to the web component.
  4. Rendering: In dist/collection/components/core/features/presto-dynamic-overlays/ui/presto-dynamic-overlay-ui.js (referenced in stats.json), the component creates an anchor element:
    // Pseudo-code representation of the web component UI logic
    render() {
      return h('a', { href: this.overlayConfig.link_url }, ...);
    }
    
  5. Execution: Since link_url is not validated against a protocol allowlist, javascript:alert(1) is rendered as <a href="javascript:alert(1)">. Clicking the overlay triggers the script.

4. Nonce Acquisition Strategy

While shortcodes themselves do not require nonces for frontend execution, saving the post containing the shortcode via the REST API requires a _wpnonce.

  1. Shortcode Context: The plugin likely enqueues its dashboard or player scripts on pages where the player is active.
  2. Strategy:
    • Use wp post create via CLI to set up a post with the shortcode. This avoids manual nonce handling for the initial setup.
    • If manual REST API interaction is required, navigate to the WordPress Dashboard (/wp-admin/index.php) using browser_navigate.
    • Use browser_eval to extract the REST nonce from the standard WordPress wpApiSettings object:
      browser_eval("window.wpApiSettings?.nonce")
      
    • Alternatively, if the plugin localizes its own nonces, check the presto_player or presto_player_overlay JS objects.

5. Exploitation Strategy

The goal is to inject a payload that executes in the context of an administrator viewing the post.

  1. Setup: Create a Contributor user.
  2. Payload Crafting: Use a standard XSS payload wrapped in the javascript: protocol:
    • javascript:alert(document.domain)
  3. Injection: As the Contributor, create a post containing the malicious shortcode.
    • Note: The overlay likely needs visibility triggers (like time="0") to appear.
    • Shortcode: [presto_player_overlay link_url="javascript:alert(origin)" text="Click Me" time="0"] (attributes inferred).
  4. Trigger: Log in as an Administrator and navigate to the published post.
  5. Execution: Click the rendered overlay element.

6. Test Data Setup

Before exploitation, configure the environment:

# 1. Install and activate the affected version of Presto Player (<= 4.2.0)
# (Assuming the plugin is already provided or installed in the environment)

# 2. Create a Contributor user
wp user create attacker attacker@example.com --role=contributor --user_pass=password123

# 3. Create a post with the vulnerable shortcode as the Contributor
# We use wp-cli to simplify the "Storage" phase
wp post create \
  --post_type=post \
  --post_status=publish \
  --post_title="Free Video Lesson" \
  --post_author=$(wp user get attacker --field=ID) \
  --post_content='[presto_player_overlay link_url="javascript:alert(document.domain)" text="Exclusive Content - Click Here" time="0"]'

7. Expected Results

  • The shortcode should be rendered by the plugin on the frontend.
  • Inspecting the HTML of the overlay should reveal an <a> tag with href="javascript:alert(document.domain)".
  • Clicking the overlay should trigger a browser alert showing the domain, confirming arbitrary JavaScript execution.

8. Verification Steps

After performing the HTTP request (as an Admin), verify the state:

  1. Inspect Content: Verify the shortcode remains unescaped in the database.
    wp post get <POST_ID> --field=post_content
    
  2. DOM Check: Using browser_eval, check if the anchor tag exists with the malicious href:
    browser_eval("document.querySelector('presto-dynamic-overlay-ui a')?.href")
    

9. Alternative Approaches

If the link_url is reflected in a non-anchor context or if standard shortcode placement is restricted:

  • Block Editor (Gutenberg): Attempt to inject the payload via the Presto Player blocks (e.g., Overlay Block) if the shortcode is generated via the block editor.
  • Data Attributes: Check if the payload survives within a JSON configuration string inside a data- attribute, which might be processed by JSON.parse() and then rendered to the DOM using .innerHTML or similar sinks.
Research Findings
Static analysis — not yet PoC-verified

Summary

The Presto Player plugin for WordPress (<= 4.2.0) is vulnerable to Stored Cross-Site Scripting via the 'link_url' attribute of the [presto_player_overlay] shortcode. Due to insufficient sanitization and URL scheme validation in the getOverlays() function, an authenticated attacker with contributor-level access can inject malicious 'javascript:' URIs that are rendered as clickable links, leading to script execution when a user interacts with the overlay.

Security Fix

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/presto-player/4.2.0/dist/components/stats.json /home/deploy/wp-safety.org/data/plugin-versions/presto-player/4.2.1/dist/components/stats.json
--- /home/deploy/wp-safety.org/data/plugin-versions/presto-player/4.2.0/dist/components/stats.json	2026-05-21 04:00:08.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/presto-player/4.2.1/dist/components/stats.json	2026-05-29 09:31:04.000000000 +0000
@@ -1,5 +1,5 @@
 {
-  "timestamp": "2026-05-21T03:54:08",
+  "timestamp": "2026-05-29T09:28:34",
   "compiler": {
     "name": "node",
     "version": "17.9.1"
@@ -1 +1 @@
-<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '4ea972b87befa5b8557d');
+<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '63a8acd4fb2275d9ed21');

Exploit Outline

1. Gain Contributor-level access to the WordPress site. 2. Create or edit a post and insert the `[presto_player_overlay]` shortcode. 3. Craft a payload by setting the `link_url` attribute to a `javascript:` URI (e.g., `link_url="javascript:alert(origin)"`). 4. Ensure the overlay is visible by setting additional attributes like `time="0"` and `text="Click Me"`. 5. Save the post and wait for a victim with higher privileges (such as an administrator) to view the page. 6. When the victim clicks the rendered overlay, the injected JavaScript executes in their browser context.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.