CVE-2024-34341
The Trix Editor Contains an Arbitrary Code Execution Vulnerability
Also known as GHSA-qjqp-xr96-cj99
Mitigation
- Upgrade trix to one of 2.1.1, 1.3.2 (or later in the same release line).
- Upgrade actiontext to one of 7.0.8.3, 7.1.3.3 (or later in the same release line).
Who should check
- Projects that depend on npm package trix (>= 2.0.0, < 2.1.1)
- Projects that depend on RubyGems package actiontext (>= 7.0.0.alpha1, < 7.0.8.3)
- Anyone running basecamp trix < 2.1.1
Vulnerability facts
- Affected
- trix >= 2.0.0, < 2.1.1; actiontext >= 7.0.0.alpha1, < 7.0.8.3
- Fixed in
- 2.1.1, 1.3.2, 7.0.8.3, 7.1.3.3
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 1.04% chance of exploitation in 30 days (percentile 63, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
Trix is a rich text editor. The Trix editor, versions prior to 2.1.1, is vulnerable to arbitrary code execution when copying and pasting content from the web or other documents with markup into the editor. The vulnerability stems from improper sanitization of pasted content, allowing an attacker to embed malicious scripts which are executed within the context of the application. Users should upgrade to Trix editor version 2.1.1 or later, which incorporates proper sanitization of input from copied content.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm trix | >= 2.0.0, < 2.1.1 | 2.1.1, 1.3.2 | osv |
| RubyGems actiontext | >= 7.0.0.alpha1, < 7.0.8.3 | 7.0.8.3, 7.1.3.3 | osv |
| basecamp trix | < 2.1.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-34341. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-34341.md Affected: trix >= 2.0.0, < 2.1.1; actiontext >= 7.0.0.alpha1, < 7.0.8.3 Fixed in: 2.1.1, 1.3.2, 7.0.8.3, 7.1.3.3 Steps: 1. Search this machine and project for trix (npm), actiontext (RubyGems), basecamp trix: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- https://github.com/basecamp/trix/pull/1147
- https://github.com/basecamp/trix/pull/1149
- https://github.com/basecamp/trix/commit/1a5c68a14d48421fc368e30026f4a7918028b7ad
- https://github.com/basecamp/trix/commit/841ff19b53f349915100bca8fcb488214ff93554
- https://github.com/rails/rails/commit/07e6c88cc4defe6f6b8d28e79eb13a518e15b14c
- https://github.com/rails/rails/commit/260cb392fc1ee91d0b749cff08d1c8d54b230bd3
- https://github.com/rails/rails/commit/73fac32511eefdd45d8f00fecc2b8cc5408ea6d5
Other
- https://github.com/basecamp/trix/releases/tag/v2.1.1
- https://discuss.rubyonrails.org/t/xss-vulnerabilities-in-trix-editor/85803
- https://github.com/basecamp/trix
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actiontext/CVE-2024-34341.yml
- https://rubyonrails.org/2024/5/17/Rails-Versions-7-0-8-2-and-7-1-3-3-have-been-released
- https://rubyonrails.org/2024/5/17/Rails-Versions-7-0-8-3-has-been-released
FAQ
Is CVE-2024-34341 being exploited?
There is no confirmed exploitation: CVE-2024-34341 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.04% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-34341?
Medium: CVSS 5.4 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2024-34341?
trix >= 2.0.0, < 2.1.1; actiontext >= 7.0.0.alpha1, < 7.0.8.3.
Is there a fix for CVE-2024-34341?
Yes. Fixed in 2.1.1, 1.3.2, 7.0.8.3, 7.1.3.3. Upgrade trix to one of 2.1.1, 1.3.2 (or later in the same release line). Upgrade actiontext to one of 7.0.8.3, 7.1.3.3 (or later in the same release line).
How do I check if I'm affected by CVE-2024-34341?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.