GHSA-g9jg-w8vm-g96v Trix has a stored XSS vulnerability through its attachment attribute
Attackers can inject malicious JavaScript via attachment attributes in the Trix editor, leading to arbitrary code execution in user sessions.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-g9jg-w8vm-g96v?
GHSA-g9jg-w8vm-g96v is a cross-site scripting vulnerability in action_text-trix, published on 31 Dec 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Impact
The Trix editor, in versions prior to 2.1.16, is vulnerable to XSS attacks through attachment payloads.
An attacker could inject malicious code into a data-trix-attachment attribute that, when rendered as HTML and clicked on, could execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed.
Patches
Update Recommendation: Users should upgrade to Trix editor version 2.1.16 or later.
Resources
The XSS vulnerability was reported by HackerOne researcher michaelcheers.
Which versions are affected by GHSA-g9jg-w8vm-g96v?
4 open source packages ship an affected version, including action_text-trix and trix.
| Package | Affected | Fixed in |
|---|---|---|
action_text-trix RubyGems | All versions | 2.1.16 |
action_text-trix RubyGems | All versions | 2.1.16 |
trix npm | All versions | 2.1.16 |
trix npm | All versions | 2.1.16 |
How do I fix GHSA-g9jg-w8vm-g96v?
Upgrade action_text-trix to 2.1.16 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is GHSA-g9jg-w8vm-g96v being exploited?
There is no known exploitation of GHSA-g9jg-w8vm-g96v in the wild and no public exploit code.