CVE-2022-29230 is a medium-severity (CVSS 6.3) Cross-site Scripting (XSS) vulnerability in @shopify/hydrogen. A fix is available for @shopify/hydrogen — see the affected versions and patch details below.
Potential Cross-site Scripting vulnerability in Hydrogen
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@shopify/hydrogennpmDescription
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @shopify/hydrogen | ≥ 0.10.0&&< 0.19.0 | 0.19.0npm install @shopify/hydrogen@0.19.0 |
Affected Products
hydrogenshopifyDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @shopify/hydrogen, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @shopify/hydrogen to 0.19.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-29230 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2022-29230 in your dependencies?
Find it across npm, including transitive dependencies.