CVE-2024-0621 — Simple Share Buttons Adder <= 8.4.11 - Authenticated(Administrator+) Stored Cross-Site Scripting via CSS Settings

The Simple Share Buttons Adder plugin for WordPress is vulnerable to Stored Cross-Site Scripting via admin settings in all versions up to, and including, 8.4.11 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with administrator-level permissions and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This only affects multi-site installations and installations where unfiltered_html has been disabled.

The plugin provides a feature to customize style, but we can escape the </style>. These input is not sanitized, causing an XSS vulnerability.

Proof of Concepts

  1. Open plugin setting then go to “Advanced Setting” tab /wp-admin/options-general.php?page=simple-share-buttons-adder
  2. Insert XSS Payload in “Custom CSS” form </style><img src onerror=alert(/XSS/)>
  3. Set where your share button location

XSS Payload will triggered in the created post .

Impact

This makes it possible for authenticated attackers, with administrator-level permissions and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.