GHSA-g9jg-w8vm-g96v
Trix has a stored XSS vulnerability through its attachment attribute
GHSA-g9jg-w8vm-g96v is a medium vulnerability (CVSS 4.6) in trix, published December 31, 2025. No source lists public exploit code. Fixed in trix 2.1.16.
- Severity
- 4.6 MediumCVSS 3.1, GitHub Advisories
- Exploit chance
- UnscoredNo EPSS score yet
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
2.1.16trix +2 more
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Affected packages
| Package | Affected | Fixed |
|---|---|---|
trixnpm | before 2.1.16 | 2.1.16 |
action_text-trixRubyGems | before 2.1.16 | 2.1.16 |
action_text-trixRubyGems | before 2.1.16, plus listed versions 0.0.12.1.15 | 2.1.16 |
What each source reports
GitHub Advisories Score used 4.6
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.
- Record
GHSA-g9jg-w8vm-g96v- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV 4.6
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.
- Record
GHSA-g9jg-w8vm-g96v- CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
References
github.com/basecamp/trix/security/advisories/GHSA-g9jg-w8vm-g96v
github.com/basecamp/trix/commit/73c20cf03ab2b56c0ef9c9b1aaf63f2de44f4010
github.com/basecamp/trix/releases/tag/v2.1.16
github.com/rubysec/ruby-advisory-db/blob/master/gems/action_text-trix/GHSA-g9jg-w8vm-g96v.yml
github.com/advisories/GHSA-g9jg-w8vm-g96v
github.com/basecamp/trix