Skip to main content

Trix Editor CVE-2026-73428

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-13 security-advisories@github.com
4.6
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with low-privilege account
  2. Delivery
    Paste crafted span with javascript: href into Trix editor
  3. Exploit
    Submit form to store malicious payload in database
  4. Execution
    Victim user loads page rendering stored Trix content
  5. Persist
    Victim clicks injected hyperlink
  6. Impact
    javascript: URI executes in victim browser session

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three sequential conditions must be met: (1) the attacker must hold an authenticated low-privilege session with write access to a Trix-powered editor input field (PR:L per CVSS vector - a standard user account is sufficient, no admin role required); (2) the attacker must paste crafted HTML containing a <span data-trix-attachment="{}"> element with a data-trix-attributes payload embedding a javascript: URI as the href value; and (3) a separate victim user must view the rendered output and actively click the injected link (UI:R). Applications applying server-side HTML sanitization on save are protected at the persistence layer regardless of whether they have patched. Single-user deployments have no viable stored XSS attack surface. Exploitation is therefore limited to multi-user applications where untrusted Trix content from one user is rendered in another user's browser session.

Impact

The vendor-assigned CVSS 4.6 (Medium) accurately reflects the threat profile: network-reachable (AV:N), low complexity (AC:L), authenticated low-privilege attacker (PR:L), mandatory victim interaction (UI:R), unchanged scope (S:U), and limited confidentiality and integrity impact (C:L/I:L/A:N). The two sequential user-interaction dependencies - attacker must paste crafted content, victim must click the rendered link - meaningfully suppress real-world exploitation likelihood compared to fully automated or click-free XSS variants. No EPSS data was provided in the intelligence sources, and the vulnerability is not listed in CISA KEV, indicating no confirmed active exploitation at time of analysis. The primary attack surface is multi-user collaborative applications built on Trix (Rails Action Text being the most prevalent deployment), where attacker-generated rich text is displayed to other users; single-user deployments have no meaningful stored XSS exposure. Applications with server-side HTML sanitization are additionally protected even without patching. Given the medium CVSS, absence from KEV, and the UI:R dependency, this should be triaged as a routine patch-cycle item rather than an emergency response trigger - though any multi-user Rails application accepting untrusted Trix content should prioritize the 2.1.18 upgrade to close the window.

Exploit ScenarioDerived

An authenticated attacker with a low-privilege account pastes crafted HTML - a <span> carrying data-trix-attachment="{}" and data-trix-attributes containing {"href":"javascript:alert(document.cookie)"} - into a Trix-powered input field such as a comment box or article body. The malicious href bypasses HTMLParser's attachment sanitization and is stored in the application database as part of the serialized Trix document. When a second user opens the page and clicks the visually innocuous hyperlink, the javascript: URI executes in their browser, enabling session cookie theft or arbitrary DOM manipulation.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 13, 2026

Stored XSS in Trix editor (all versions prior to 2.1.18) allows an authenticated low-privilege user to persist a javascript: URI payload via the paste path, which executes in victim browsers when the rendered content is viewed and the injected link is clicked. The entry vector exploits HTMLParser's mishandling of a crafted <span data-trix-attachment="{}"> element, which bypasses attachment processing and routes unvalidated attributes - including a malicious href - into the document model through StringPiece.fromJSON. No public exploit has been identified and the vulnerability is absent from CISA KEV; a vendor-confirmed fix is available in version 2.1.18.

RemediationAI

Upgrade to Trix 2.1.18 or later, confirmed fixed in commit 9c0a993 and tagged release https://github.com/basecamp/trix/releases/tag/v2.1.18. For npm consumers run npm update trix or yarn upgrade trix; for Ruby/Rails applications update action_text-trix to >= 2.1.18 in the Gemfile and run bundle update action_text-trix. For applications unable to patch immediately, enabling server-side HTML sanitization (e.g., Rails' ActionView::Helpers::SanitizeHelper or a comparable library) will neutralize the javascript: URI on save, preventing persistence of the malicious href - note this workaround only protects against future submissions and does not remediate already-stored malicious content in the database, which would require reprocessing existing records. There is no Trix configuration flag to disable the vulnerable paste behavior without upgrading.

Affected Packages

npm action_text-trix fix: 2.1.18
npm trix fix: 2.1.18
rubygems action_text-trix fix: 2.1.18
rubygems trix fix: 2.1.18

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Trix is a WYSIWYG rich text editor maintained by Basecamp, distributed as npm package trix and Ruby gem action_text-trix (bundled with Rails Action Text). The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation): the pre-2.1.18 StringPiece.fromJSON method returned new this(pieceJSON.string, pieceJSON.attributes) without inspecting whether attributes.href carried a javascript: URI scheme. The exploit entry point is the paste flow: HTMLParser encounters a <span> with data-trix-attachment="{}" - an empty attachment object - which causes the attachment handler to be skipped entirely. Because attachment-specific sanitization is bypassed, the element's data-trix-attributes values (including a crafted href) are applied directly to a plain StringPiece and serialized verbatim into the stored document HTML. The fix (commit 9c0a993) integrates DOMPurify.isValidAttribute("a", "href", value) before constructing the StringPiece, blocking javascript: URIs in standard, mixed-case, and whitespace-padded forms. This vulnerability shares its fix with GHSA-53p3-c7vp-4mcc, which covers a parallel drag-and-drop entry path through the Level0InputController.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 4.6 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

S:C assigned because stored XSS causes attacker content to execute in a victim's browser - a different security domain from the attacker's session; PR:L confirmed by requirement for authenticated write access.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Red Hat 4.6 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionCVE.org

Trix is a what-you-see-is-what-you-get rich text editor for everyday writing. Prior to 2.1.18, Trix is vulnerable to stored cross-site scripting when crafted HTML is pasted into the editor. HTMLParser processes a mock attachment in a <span> with an empty data-trix-attachment="{}" value, causing data-trix-attributes to be applied to a plain string piece. StringPiece.fromJSON accepts an unvalidated href, allowing a javascript: URI to enter the document model and serialized HTML and execute when another user renders and clicks the content. Applications that apply server-side HTML sanitization can neutralize the payload on save. This issue is fixed in version 2.1.18.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
default component in Rails Action Text, common in Rails apps
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

23
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +23
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy