Stored XSS in SelectView via Missing Server-Side Option Validation
Published: July 22, 2026
SECURITY IDENTIFIERS
- GHSA: GHSA-7m8w-vg9p-qjr6
- Vendor Advisory: https://github.com/AlchemyCMS/alchemy_cms/security/advisories/GHSA-7m8w-vg9p-qjr6
GEM
SEVERITY
CVSS v3.x: 5.4 (Medium)
PATCHED VERSIONS
~> 8.0.16
~> 8.1.15
~> 8.2.9
>= 8.3.5
DESCRIPTION
Summary
Alchemy::Ingredients::SelectView#call delegates to super (i.e., Alchemy::Ingredients::BaseView#call) for the single-value path, which returns value.html_safe. The allowed option list (select_values) defined in elements.yml is enforced only in the admin UI dropdown; no server-side validation checks that a submitted value belongs to the allowed set. An authenticated CMS author can bypass the dropdown by sending a direct API request with an arbitrary HTML string as the ingredient value. That string is stored verbatim and rendered unescaped into the published public page, executing in every visitor's browser.
RELATED
- https://rubygems.org/gems/alchemy_cms/versions/8.3.5 - https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v8.3.5 - https://github.com/AlchemyCMS/alchemy_cms/pull/4081
- https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v8.2.9
- https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v8.1.15
- https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v8.0.16
- https://github.com/AlchemyCMS/alchemy_cms/security/advisories/GHSA-7m8w-vg9p-qjr6
