Executive brief
DOM Expressions is a JavaScript library used to build dynamic web interfaces in Solid.js applications. The library improperly sanitizes user-controlled data when inserting meta tag attributes, allowing attackers to inject arbitrary JavaScript code through special replacement patterns. An attacker can craft a malicious payload (for example, in a user profile's meta tag) to execute code in victims' browsers or perform account takeover and data theft.
Technical details
The vulnerability is a cross-site scripting (XSS) flaw in dom-expressions caused by improper use of JavaScript's string.replace() method. The library uses .replace() to insert assets into HTML headers without properly escaping special replacement patterns ($ and
Affected products
- Solid.js DOM Expressions < 0.39.5
Timeline
- 2025-02-21: disclosed: Advisory published on GitHub and NVD
- 2025-02-25: patched: Fix available in version 0.39.5