GHSA-53g2-mvcc-q9x3 is a medium-severity (CVSS 4.6) Cross-site Scripting (XSS) vulnerability in trix. A fix is available for trix — see the affected versions and patch details below.
Trix: Stored XSS via HTMLParser attribute injection on paste
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-53g2-mvcc-q9x3.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-53g2-mvcc-q9x3 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 379,842 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
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.
trixnpmDescription
Impact
The Trix editor, in versions prior to 2.1.18, is vulnerable to XSS when crafted HTML is pasted into the editor. The HTMLParser processed a mock attachment, a <span> carrying an empty data-trix-attachment="{}". The empty attachment object caused the element to bypass attachment handling, so its data-trix-attributes were applied to a plain string piece. The pre-2.1.18 StringPiece.fromJSON accepted the href without validation, so an attacker-supplied javascript: URI was carried into the document model and emitted verbatim into the serialized HTML, executing when the content was rendered and clicked.
This is a stored XSS in any application that accepts untrusted rich text through Trix and renders the serialized output to other users. Applications that apply server-side HTML sanitization, such as the Rails built-in sanitizer, are additionally protected because the payload is neutralized on save.
This vulnerability shares its fix with GHSA-53p3-c7vp-4mcc. Both are resolved by the StringPiece.fromJSON sanitization added in 2.1.18. This advisory covers the paste and HTMLParser entry vector, while GHSA-53p3-c7vp-4mcc covers the drag-and-drop path through the fallback Level0InputController.
Patches
Users should upgrade to Trix editor version 2.1.18 or later.
References
The vulnerability was responsibly reported by HackerOne researcher newbiefromcoma.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | trix | all versions | 2.1.18npm install trix@2.1.18 |
| 💎RubyGems | action_text-trix | all versions | 2.1.18bundle update action_text-trix --conservative |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for trix, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update trix to 2.1.18 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-53g2-mvcc-q9x3 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.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
No Red Hat products ship a vulnerable version of this component.
Applications that apply server-side HTML sanitization can neutralize the XSS payload on save, preventing exploitation even on unpatched versions of Trix.Source: Red Hat security advisory for GHSA-53g2-mvcc-q9x3 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-53g2-mvcc-q9x3 in your dependencies?
Find it across npm, RubyGems, including transitive dependencies.