Skip to content

Instantly share code, notes, and snippets.

@Xib3rR4dAr
Created July 21, 2022 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xib3rR4dAr/6aa9e730c1d030a5ee9f9d1eae6fbd5e to your computer and use it in GitHub Desktop.
Save Xib3rR4dAr/6aa9e730c1d030a5ee9f9d1eae6fbd5e to your computer and use it in GitHub Desktop.
Wordpress Simple Banner <= 2.11.0 Plugin Multiple vulnerabilities

Wordpress Simple Banner <= 2.11.0 Plugin Multiple vulnerabilities

Exploit Author: Muhammad Zeeshan (Xib3rR4dAr)
Vulnerable Plugin: Simple Banner
Plugin Slug: simple-banner
Active Plugin Installations: 50,000+
Vulnerable Version: <= 2.11.0 (latest version as of discovery)
Tested on: Wordpress v6.0.1
Vulnerability: Authenticated Stored XSS
Discovery date: July 19, 2022 Fix: Update plugin to version 2.12.0 or higher

Proof of Concept:

Login as admin and visit: http://127.0.0.1/wp-admin/admin.php?page=simple-banner-settings
>> In "Activation Code" field enter XSS payload as HoverHere" onmouseover=alert(1) a
>> Click Save Changes

Stored XSS will trigger when any user having ability to manage "Simple Banner" visits: http://127.0.0.1/wp-admin/admin.php?page=simple-banner-settings and hovers on "Activation Code" text box.

User input is escaped by escaping quotes with backslash, that doesnot prevent XSS in html context. Instead, user input should be sanitized or HTML entities be encoded before displaying to user.

This vulnerability can be exploited by any user with any role even by subscriber if subscriber is given permissions to use the plugin. Therefore a subscriber user can exploit XSS to perform actions on behalf of other users.

Stored XSS

Improper Input handling

Furthermore plugin has option to allow users of any role to access "Simple Banner" plugin. Other vulnerability classified as problematic is that, when using the plugin, an admin can allow any role to access the plugin.

Expected behavior of feature: Role would be able to access "Simple Banner" plugin only

Actual Behavior: Role can access other plugins also other than "Simple Banner".

Admin would think that role would only be able to access "Simple Banner" but the role in actual would be able to access other plugins also since it adds capability of managing roles to users.

Capability Addition

Before allowing subscriber to access "Simple banner": (No plugin accessible to a user with subscriber role)

Before

After allowing subscriber to access "Simple banner": (Plugins other than "Simple Banner" also accessible to subscriber)

After

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment