| Plugin Name | Video Onclick |
|---|---|
| Type of Vulnerability | Cross-Site Scripting (XSS) |
| CVE Number | CVE-2026-1608 |
| Urgency | Medium |
| CVE Publish Date | 2026-02-08 |
| Source URL | CVE-2026-1608 |
CVE-2026-1608 — Stored XSS in Video Onclick Plugin (≤ 0.4.7): What Site Owners and Developers Need to Know
Excerpt: A contributor-level stored XSS in the Video Onclick WordPress plugin (≤ 0.4.7) allows malicious content via shortcode. This post explains the risk, how exploitation works, how to detect it, immediate mitigations you can apply right now, and long-term developer fixes. Written from the perspective of a Hong Kong security practitioner: concise, pragmatic, and risk-focused.
TL;DR — Quick summary
- Vulnerability: Authenticated (Contributor+) stored Cross‑Site Scripting (XSS) via a shortcode in the Video Onclick WordPress plugin, tracked as CVE‑2026‑1608.
- Affected versions: ≤ 0.4.7
- Required privilege: Contributor (or higher)
- Impact: Stored XSS — attacker can store a payload that executes in privileged users’ browsers when they view a page containing the shortcode. CVSS: 6.5 (scope change possible), user interaction required in many exploitation scenarios.
- Immediate actions for site owners: deactivate or remove the plugin; if you cannot, disable the shortcode rendering with a small snippet (see below); scan posts and comments for injected shortcodes and script tags; rotate credentials for administrators; put additional access controls in place.
- Developer fixes: sanitize and escape user-supplied data, validate attributes strictly, and keep shortcodes output-escaping robust (esc_attr, esc_url, wp_kses or similar).
Why this matters: stored XSS via shortcode explained in plain English
Shortcodes are a convenient feature in WordPress that let authors embed dynamic elements—players, buttons, galleries—into post content. But they accept attributes and inner content that may come from untrusted users. If those values are output without proper validation and escaping, an attacker can store JavaScript or HTML in the database that runs when other visitors or administrators load the page.
The Video Onclick plugin vulnerability allows an authenticated user with Contributor-level access to insert shortcode content that is not properly sanitised. Because that payload is stored and later rendered by the shortcode, this is a classic stored XSS: no external lure page is required—just get malicious content into a location that a privileged user will view. Many sites create Contributor accounts for contractors or content workflows, so this threat is realistic for a wide range of installations.
Realistic impact and attack scenarios
- If administrators or editors load a page/post that renders the shortcode, the attacker’s JavaScript may run in their browser and steal cookies, hijack sessions, issue authenticated AJAX requests, or perform actions as the admin (create users, change settings, install plugins). This is the most serious outcome.
- Editors and reviewers who preview content are attractive targets—previewing a crafted post can trigger the payload.
- If the shortcode is rendered to front-end visitors, the payload can deliver drive-by redirects, malvertising, or cryptominer code.
- Even partial sanitisation can be bypassed by creative attribute or inner-HTML injection—attackers craft values to break out of attributes and insert script.
- Stored XSS persists in the database, so removing the attacking account alone does not remove the danger; the stored content must be found and cleaned.
How the vulnerability typically looks (technical overview)
Common insecure shortcode patterns concatenate attributes and content directly into HTML without escaping. A simplified vulnerable pattern looks like this:
<?php
function video_onclick_shortcode($atts, $content = '') {
$a = shortcode_atts( array(
'src' => '',
'title' => ''
), $atts );
// BAD: outputting attributes and content directly without escaping or validation
$html = '<div class="video-onclick" data-src="' . $a['src'] . '" title="' . $a['title'] . '">';
$html .= $content;
$html .= '</div>';
return $html;
}
add_shortcode('video_onclick', 'video_onclick_shortcode');
?>
Issues here:
- Attribute values are injected into HTML attributes without esc_attr() or esc_url().
- Content is included without wp_kses() or other filtering.
- No validation of URLs or attribute types.
- An attacker can inject event handlers or close attributes and insert script tags.
A safer pattern validates and escapes every untrusted value. Example safe pseudo-code:
<?php
function video_onclick_shortcode($atts, $content = '') {
$a = shortcode_atts( array(
'src' => '',
'title' => ''
), $atts );
// Validate and sanitize: only allow protocols we expect
$src = esc_url_raw( $a['src'] );
// Escape attributes for HTML
$title = esc_attr( sanitize_text_field( $a['title'] ) );
// Allow limited HTML in content, or strip completely
$content = wp_kses_post( $content );
$html = '<div class="video-onclick" data-src="' . esc_attr( $src ) . '" title="' . $title . '">';
$html .= $content;
$html .= '</div>';
return $html;
}
?>
Key points: validate URLs, escape attributes, sanitise content, and use allowed-HTML filtering.
Proof-of-concept (conceptual, non-executable)
Keeping PoC details non-functional avoids handing ready-to-run exploit code, but understanding the pattern helps you find and remediate it.
- An attacker with Contributor access submits a draft or user content containing the plugin shortcode with attributes or inner content crafted to carry script, for example:
[video_onclick src="..."]<script>/* payload */</script>[/video_onclick]- or
[video_onclick title='x" onmouseover="/* payload */'] - When a privileged user previews or views the post, the browser executes the payload in their session context.
Because stored XSS needs at least one privileged viewer, immediate risk can be lowered by strict moderation and privilege separation while you investigate.
Immediate actions for site owners (step‑by‑step)
If you run WordPress sites that use the Video Onclick plugin, act now:
-
Deactivate the plugin
If you do not absolutely need the plugin, deactivate and remove it immediately. -
If you cannot remove it, disable the shortcode rendering
Add this to a must‑use plugin or your theme’s functions.php (MU plugin recommended so it survives theme changes):<?php // mu-disable-video-onclick.php add_action( 'init', function() { if ( shortcode_exists( 'video_onclick' ) ) { remove_shortcode( 'video_onclick' ); } }, 20 ); ?>Removing the shortcode prevents the plugin’s callback from running on page render, stopping stored payloads from executing while you investigate.
-
Scan posts and custom tables for occurrences of the shortcode
Use WP‑CLI or SQL to find stored instances.WP‑CLI example:
wp post list --post_type='post,page' --format=ids | xargs -n1 -I % wp post get % --field=post_content | grep -n "\[video_onclick"SQL example:
SELECT ID, post_title FROM wp_posts WHERE post_content LIKE '%[video_onclick%'; -
Sanitise or remove infected posts
Open affected posts in HTML view and remove or clean the shortcode attributes and inner HTML. Consider exporting posts and running a controlled search-and-replace or using wp_kses_post rules to strip script tags and suspicious attributes. -
Check user accounts with Contributor-level or higher
Review recently-created contributors and revoke accounts that appear unauthorized. Enforce strong passwords and multi-factor authentication for privileged roles. -
Rotate administrator credentials
If you suspect compromise, rotate admin passwords and invalidate active sessions. -
Enable monitoring and scan the site
Run a full malware scan and check for modified files, unknown cron jobs, and unexpected plugin/theme changes. -
Apply virtual patching or WAF rules if you have the capability
If you operate a web application firewall, deploy conservative rules to block POST bodies that include the shortcode with script tags or suspicious event handlers while you clean the site. Test rules on staging to avoid breaking legitimate workflows.
Example temporary WAF/signature rules (conceptual)
If your infrastructure supports pattern blocking, consider conservative rules tuned to your site. Work with your operations team to test before activating in production.