Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
UI:R applied because victim must visit the injected page; all other metrics match provided vector; PR:L reflects mandatory contributor authentication.
Primary rating from Vendor (Wordfence).
CVSS VectorVendor: Wordfence
Lifecycle Timeline
2DescriptionCVE.org
The Ultimate Post plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'moreResultsText' block attribute of the ultimate-post/advanced-search block in versions up to and including 5.0.31. This is due to insufficient input sanitization and output escaping in the Advanced_Search::content() render callback: the attribute value is filtered with wp_kses(), which strips disallowed HTML tags but does NOT escape HTML special characters such as double quotes in plain text, and the result is then concatenated directly into the data-viewmoretext HTML attribute without esc_attr(). 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.
AnalysisAI
Stored Cross-Site Scripting in the Ultimate Post (PostX) WordPress plugin versions up to and including 5.0.31 allows authenticated contributors to permanently inject arbitrary JavaScript into WordPress pages via the 'moreResultsText' attribute of the advanced-search Gutenberg block. The root cause is a sanitization gap: the render callback applies wp_kses() which strips disallowed HTML tags but does not encode special characters like double quotes in attribute context, and the unsanitized value is then concatenated directly into the data-viewmoretext HTML attribute without esc_attr(), allowing attribute boundary escape. No public exploit code has been identified at time of analysis, and no EPSS data was provided, but the contributor-level access requirement represents the primary real-world friction point for exploitation.
Technical ContextAI
The vulnerability resides in the Advanced_Search::content() render callback of the 'ultimate-post' WordPress plugin (CPE: cpe:2.3:a:wpxpo:post_grid_gutenberg_blocks_-_postx:*:*:*:*:*:*:*:*), marketed under both the 'Ultimate Post' and 'PostX' branding. The block editor exposes a 'moreResultsText' block attribute that is passed through wp_kses(), a WordPress function designed to strip disallowed HTML tags. However, wp_kses() is not an attribute-context encoder - it does not escape double quotes or other HTML special characters in text that will appear inside an HTML attribute value. The vulnerable code, visible in the WordPress.org trac browser for versions 5.0.27 and 5.0.28 at blocks/Advanced_Search.php line 116 and line 108, concatenates this insufficiently sanitized value directly into the data-viewmoretext HTML attribute without wrapping it through esc_attr(). This is a classic CWE-79 (Improper Neutralization of Input During Web Page Generation) sink: context mismatch between the sanitization function (HTML body context) and the output destination (HTML attribute context). The stored nature means the payload persists in the post content and fires for every subsequent visitor.
RemediationAI
A fix has been committed upstream as WordPress.org plugin changeset 3598669 (https://plugins.trac.wordpress.org/changeset?reponame=&old=3598669%40ultimate-post&new=3598669%40ultimate-post); however, the exact patched release version is not independently confirmed from available data - site administrators should update to the latest available version of the Ultimate Post / PostX plugin beyond 5.0.31 and verify via the WordPress admin plugin page. The correct code-level fix is to wrap the moreResultsText attribute value through esc_attr() before concatenation into the data-viewmoretext HTML attribute, replacing reliance on wp_kses() alone for attribute-context output. As a compensating control where updating immediately is not possible, administrators should audit and restrict contributor-level user roles, removing or demoting untrusted contributor accounts, since contributor access is the hard prerequisite for exploitation. Restricting the use of the advanced-search block to trusted editors via block permissions (e.g., through a roles capability plugin) is a viable interim mitigation with minimal editorial workflow impact.
More in Wordpress Plugin
View allThe Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil
Authentication bypass in the LiteSpeed Cache WordPress plugin (versions prior to 6.5.0.1) allows unauthenticated remote
The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner
The SureTriggers WordPress plugin through version 1.0.82 contains a privilege escalation vulnerability that allows unaut
The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via
The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based
SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a
The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i
The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base
The Email Subscribers by Icegram Express plugin for WordPress is vulnerable to SQL Injection via the ‘hash’ parameter in
Remote code execution in the WP Query Console WordPress plugin (versions up to and including 1.0) by Ajit Bohra allows u
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-42520
GHSA-fmqh-3qcq-wcxg