Starboard Suite Reservation Calendars <= 3.1.4 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes
Description
The Starboard Suite Reservation Calendars plugin for WordPress is vulnerable to Stored Cross-Site Scripting via shortcode attributes in the [starboard-suite-lightbox] shortcode in all versions up to, and including, 3.1.4 due to insufficient input sanitization and output escaping. 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.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:NTechnical Details
<=3.1.4What Changed in the Fix
Changes introduced in v3.1.5
Source Code
WordPress.org SVN<script>alert(1)</script>`? * `preg_match('/["\'\;<>\\{}]/', $value)` blocks `<` and `>`. * The sanitization seems solid *if used*. * Let's look at the most likely scenario: The developer uses `shortcode_atts` to get a list of values, and then iterates over that list to build the …
Show full research plan
* `preg_match('/["\'\;<>\\{}]/', $value)` blocks `<` and `>`.
* The sanitization seems solid *if used*.
* Let's look at the most likely scenario: The developer uses `shortcode_atts` to get a list of values, and then iterates over that list to build the `data-` attributes for the lightbox JS.
* In `starboard-suite.php`:
```php
$data_attributes = array(
...
);
```
* If there's an attribute in `$atts` (from `shortcode_atts`) that is NOT put into `$data_attributes` but instead appended to the `$output` string directly.
* Or, if `$data_attributes` is simply used to build the string like this:
```php
foreach ($data_attributes as $key => $val) {
$output .= " data-$key='$val'";
}
```
* And if one of the attributes was *added* to `$data_attributes` but *missed* the `sanitize_` call.
* Example:
`'gift-certificate' => $atts['gift-certificate'],` (missing sanitize call)
* Then `[starboard-suite-lightbox gift-certificate="' onmouseover='alert(1)'"]` would work.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.