Ultimate Post
- <= 5.0.31
A stored cross-site scripting vulnerability has been identified in the Ultimate Post plugin for WordPress, specifically in versions through 5.0.31. The issue arises in the 'moreResultsText' block attribute of the 'ultimate-post/advanced-search' block. This vulnerability is due to inadequate input sanitization and output escaping in the 'Advanced_Search::content()' render callback. While the attribute value is filtered with 'wp_kses()' to remove disallowed HTML tags, it does not escape HTML special characters, such as double quotes, in plain text. Consequently, the unescaped data is directly added to the 'data-viewmoretext' HTML attribute without using 'esc_attr()'. As a result, authenticated attackers with contributor-level access or higher can inject arbitrary web scripts into pages, which will execute when a user accesses the compromised page.
Exploitation of this vulnerability allows for stored cross-site scripting, where injected scripts are executed in the context of the user viewing the page.
To reproduce this vulnerability, an authenticated user with contributor-level access or higher can create or edit a post using the 'ultimate-post/advanced-search' block. By injecting a script into the 'moreResultsText' block attribute, the unescaped script will be executed when the post is viewed.
Users are advised to update the Ultimate Post WordPress plugin to version 5.0.32 or later.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.