Trix has a stored XSS vulnerability through its attachment attribute
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | trix | < 2.1.16 | 2.1.16 |
References
- https://github.com/basecamp/trix/security/advisories/GHSA-g9jg-w8vm-g96v
- https://github.com/basecamp/trix/commit/73c20cf03ab2b56c0ef9c9b1aaf63f2de44f4010
- https://github.com/basecamp/trix
- https://github.com/basecamp/trix/releases/tag/v2.1.16
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/action_text-trix/GHSA-g9jg-w8vm-g96v.yml
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- npm
- Package
trix- Disclosed
- 31.12.2025
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-g9jg-w8vm-g96v - CC BY 4.0
Vulnerability history: trix
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 9
- First → latest
- 05.2024 07.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Medium 7
- Low 2
Disclosures per year
- 2024: 3
- 2025: 3
- 2026: 3
-
Trix has a stored XSS vulnerability through its attachment attribute this entry
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.