Security Changelog - Hyvä Commerce
This page documents security-relevant vulnerability fixes for Hyvä Commerce.
CMS Tailwind JIT 2.0.5 - 2026-11-10
Cross-Site Scripting via the Tailwind JIT Compiler iframe
Hyvä CMS requires the hyva-themes/magento2-cms-tailwind-jit module, so it is installed on every Hyvä Commerce store. The module's Tailwind compiler iframe accepted compile requests from any page through postMessage, without checking which window or origin sent them. The Tailwind v3 compiler passed the received configuration to eval, and the Tailwind v4 compiler wrote the received content into the iframe document with innerHTML. The compiler pages can be opened without logging in, and a page opened with window.open is not blocked by the X-Frame-Options header. A single click on a malicious page was enough to run the attacker's JavaScript on the store origin. If the Magento admin runs on the same origin as the storefront and the attacker knows the admin path, this can extend to actions performed with a logged-in admin's session.
In the admin, the Tailwind v4 compiler iframe also wrote saved product, category and CMS content into a document on the admin origin, so markup in that content could run script in the admin.
Version 2.0.5 accepts compile requests only from the page that embeds the compiler iframe on the same origin, sends the results back to that origin only, and no longer writes the content into the iframe document.
- Impact: Cross-Site Scripting (Storefront; Admin under the conditions above)
- Severity: Medium
- Affected versions: >= 1.0.0 < 2.0.5
- Note: Hyvä Commerce requires
hyva-themes/magento2-cms-tailwind-jit^2.0.4, so runningcomposer update hyva-themes/magento2-cms-tailwind-jitinstalls 2.0.5. The 1.x versions do not receive a fix. Stores still on 1.x need to update to 2.0.5, which is backwards compatible. Because of the medium severity the fix ships as a regular release and not as a separate patch release.
Redeploy static content after updating. The fix changes the JavaScript bundles of the compiler. In production mode, run bin/magento setup:static-content:deploy. In developer mode, remove the deployed files below pub/static (keep pub/static/.htaccess) and the contents of var/view_preprocessed. Then flush the cache. Otherwise browsers keep loading the old, vulnerable bundles.
Behavior changes in 2.0.5. Stored Tailwind CSS that could become markup during later content processing is now refused when an entity is saved, and skipped when it is rendered. Tailwind generates such CSS only for arbitrary values that contain markup, for example content-['<b>']. Entities saved with earlier versions that contain such CSS render without their stored styles, and the warning not rendering stored Tailwind CSS with an unsafe sequence is logged with the entity ID and theme. Remove the class and save the entity again. If a theme's Tailwind CSS contains an SVG data URI that isn't percent-encoded (url("data:image/svg+xml,<svg …")), saving content that uses it fails. Percent-encode the SVG to fix this.
The module's composer.json now requires PHP 8.1 or newer. This is not a new requirement: the code has needed PHP 8.1 since version 2.0.0, and the previous constraint was wrong.
Interim mitigation. If you can't update right away, configure the web server to send the header Content-Security-Policy: sandbox allow-scripts for .html files below /static/. A compiler page opened directly then runs in an opaque origin without access to the store. This does not affect the admin Tailwind v3 compiler, which already runs in a sandboxed iframe, or Knockout templates, which are loaded with XHR. Don't block the static .html files completely, because that breaks Tailwind v3 compilation in the admin. Blocking the /tailwind-jit/iframe route is only safe if the storefront doesn't embed it. The Hyvä CMS Liveview Editor embeds it when the in-browser compilation strategy is used instead of the compiler daemon.
The 2.0.5 release also contains further hardening from an internal review, for example script-free sandboxed Page Builder previews and checks on stored Tailwind CSS. See the full changelog entry for details.
Many thanks to Ilvars Švanda (Magebit), Emils Malovka (Magebit) and Maksim Soldatjonok for reporting this issue!
Full changelog entry for 2.0.5.