Skip to main content

CVE-2025-5841: ACF Onyx Poll WordPress XSS Vulnerability

CVE-2025-5841 is a stored cross-site scripting vulnerability in the ACF Onyx Poll WordPress plugin affecting versions up to 1.1.9. Authenticated attackers can inject malicious scripts via the class parameter. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-5841 Overview

CVE-2025-5841 is a Stored Cross-Site Scripting (XSS) vulnerability in the ACF Onyx Poll plugin for WordPress. The flaw affects all versions up to and including 1.1.9 and stems from insufficient input sanitization and output escaping on the class parameter. Authenticated attackers with Contributor-level access or higher can inject arbitrary JavaScript that executes in the browser of any visitor viewing the affected page. The issue is tracked under CWE-79 and was addressed in plugin version 1.2.0.

Critical Impact

Low-privileged WordPress users can inject persistent JavaScript that executes in other users' browsers, enabling session theft, admin account takeover, and redirection to attacker-controlled infrastructure.

Affected Products

  • ACF Onyx Poll plugin for WordPress — all versions up to and including 1.1.9
  • WordPress sites using the vulnerable plugin with Contributor or higher user accounts
  • Fixed in ACF Onyx Poll version 1.2.0

Discovery Timeline

  • 2025-06-13 - CVE-2025-5841 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-5841

Vulnerability Analysis

The ACF Onyx Poll plugin accepts a class parameter used to render CSS class attributes on poll markup. In vulnerable releases the plugin fails to sanitize this input on save and does not escape it on output. An authenticated user with Contributor privileges or above can store malicious script content through the class parameter. The payload persists in the database and executes whenever another user, including administrators, loads a page containing the poll. Comparing the plugin source at tag 1.1.8 with tag 1.2.0 shows the fix was applied at onyx-poll.php line 63, where proper escaping was introduced.

Root Cause

The root cause is a missing output-encoding step on attacker-controlled HTML attribute data. The plugin treats the class parameter as trusted markup rather than untrusted user input. Neither sanitize_html_class() on input nor esc_attr() on output was applied in versions up to 1.1.9, allowing attribute-breakout payloads such as closing the attribute quote and introducing event handlers like onmouseover or onerror.

Attack Vector

Exploitation requires an authenticated WordPress account with Contributor role or higher. The attacker crafts a poll or page that includes a malicious class value containing an attribute-breakout and inline JavaScript. Once stored, any visitor rendering the page triggers the script in their browser session. Because the Scope is Changed in the vulnerability's impact profile, the executed script runs in the context of the WordPress site origin and can act with the privileges of the viewing user, including administrators. See the Wordfence Vulnerability Report for additional detail.

No verified public proof-of-concept code is available. Technical details can be reviewed in the WordPress Plugin Code - 1.1.8 and the fixed WordPress Plugin Code - 1.2.0.

Detection Methods for CVE-2025-5841

Indicators of Compromise

  • Poll or page content in wp_posts containing class attribute values with embedded <script>, onerror=, onmouseover=, or javascript: tokens.
  • Unexpected outbound requests from administrator browsers to unknown domains shortly after loading pages with ACF Onyx Poll shortcodes.
  • New administrator accounts or modified user roles created shortly after a Contributor-level user edited poll content.
  • Browser console errors or Content Security Policy (CSP) violations tied to pages rendering the plugin's output.

Detection Strategies

  • Audit the WordPress database for stored HTML attribute payloads using queries that search post_content and plugin meta for on\w+= patterns and javascript: schemes.
  • Review WordPress audit logs for Contributor-role users submitting or editing poll content on sites running ACF Onyx Poll <= 1.1.9.
  • Deploy web application firewall (WAF) rules that flag HTTP POST bodies containing attribute-breakout patterns targeting plugin endpoints.

Monitoring Recommendations

  • Continuously monitor the installed plugin inventory to identify WordPress hosts running ACF Onyx Poll versions at or below 1.1.9.
  • Alert on role escalation events, new administrator creation, and wp_options changes that follow page views of poll-enabled URLs.
  • Forward WordPress and web server logs to a centralized analytics platform and correlate authenticated session activity with payload submissions.

How to Mitigate CVE-2025-5841

Immediate Actions Required

  • Update the ACF Onyx Poll plugin to version 1.2.0 or later on every WordPress site in the environment.
  • Review all existing poll content and page revisions for stored script payloads and remove them before re-enabling the plugin.
  • Rotate credentials for any administrator who viewed potentially compromised pages while the vulnerable version was active.
  • Restrict Contributor-level account creation and audit existing Contributor accounts for signs of abuse.

Patch Information

The vendor remediated the issue in ACF Onyx Poll version 1.2.0. The fix introduces proper escaping of the class parameter at onyx-poll.php line 63, as shown in the 1.2.0 source. Site administrators should apply updates through the WordPress plugin management console or via WP-CLI. Additional vendor information is available on the ACF Onyx Poll plugin page.

Workarounds

  • Temporarily deactivate the ACF Onyx Poll plugin until it can be upgraded to 1.2.0 or later.
  • Remove Contributor and higher privileges from untrusted users to eliminate the required precondition for exploitation.
  • Deploy WAF rules that block requests containing HTML attribute-breakout patterns in parameters associated with the plugin.
  • Enforce a strict Content Security Policy that disallows inline scripts and unsanctioned event handlers across the site.
bash
# Update ACF Onyx Poll to the patched version using WP-CLI
wp plugin update acf-onyx-poll --version=1.2.0

# Verify the installed version is no longer vulnerable
wp plugin get acf-onyx-poll --field=version

# If immediate patching is not possible, deactivate the plugin
wp plugin deactivate acf-onyx-poll

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.