Skip to main content
Menu
Advisories

Stored XSS in solidus_admin (unescaped flash alert)

GHSA-97HP-C986-727RPublished Updated GitHub

Description

The solidus_admin alert component renders its message with .html_safe. Currently, the only code path that could be exploited is the store destroy endpoint. It builds the flash message from the store name. (Which is admin-editable.) A store whose name contains an HTML/JS payload would execute in the admin's browser when a bulk store-destroy partially fails.

Proof of concept

  1. In solidus_admin, set a store's Name to: <img src=x onerror=alert(document.cookie)>
  2. Trigger a bulk store-destroy that fails for at least one store (e.g. attempt to delete the default store / a store that cannot be removed).
  3. The failure alert renders, and the store name executes as HTML/JS in the admin's browser.

Work-around

If you're currently unable to upgrade, we recommend using the old solidus_backend admin until you're able.

Impact

This vulnerability requires a malicious user with admin-level permissions to manage stores. Followed by a targeted admin taking action to delete aforementioned stores with XSS in their names. All apps using the new admin are currently vulnerable until upgrading.

Affected versions

References

GitHub · solidusio/solidus