Potential Cross-site Scripting vulnerability in Hydrogen
Impact
There is a potential Cross-Site Scripting (XSS) vulnerability where an arbitrary user is able to execute scripts on pages that are built with Hydrogen. This affects all versions of Hydrogen starting from version 0.10.0 to 0.18.0. This vulnerability is exploitable in applications whose hydrating data is user controlled.
Patches
All Hydrogen users should upgrade their project to v0.19.0.
Workarounds
There is no current workaround, and users should update as soon as possible.
Additionally, the Content Security Policy is not an effective mitigation for this vulnerability.
References
GitHub: Hydrogen v0.19.0 Fix PR: https://github.com/Shopify/hydrogen/pull/1272
For more information
If you have any questions or comments about this advisory:
- Open an issue in Shopify/hydrogen
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @shopify/hydrogen | >= 0.10.0, < 0.19.0 | 0.19.0 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L- Weakness (CWE)
CWE-79- Platform
- npm
- Package
@shopify/hydrogen- Disclosed
- 19.05.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-6j22-wv8g-894f - CC BY 4.0
Vulnerability history: @shopify/hydrogen
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.