Skip to main content

Trix Editor EUVDEUVD-2026-57622

| CVE-2026-73427 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-08-12 GitHub_M
2.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Host draggable element with crafted application/x-trix-document JSON payload
  2. Delivery
    Social engineer victim to drag content into Trix editor in WebView
  3. Exploit
    Level0InputController intercepts drop event and passes JSON to StringPiece.fromJSON
  4. Execution
    javascript: URI applied to anchor href without DOMPurify validation
  5. Persist
    Injected link rendered in editor DOM
  6. Impact
    Victim clicks link, executing JavaScript in page context

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

Two specific conditions must simultaneously hold for exploitation to succeed. First, the Trix editor must be operating via the Level0InputController fallback - this occurs only in environments lacking Input Events Level 2 API support, primarily mobile embedded WebViews (e.g., Android WebView, iOS WKWebView in configurations that disable the API) and certain iframes; standard desktop Chrome, Firefox, and Safari are not affected because they use the modern InputController path. Second, the victim must actively drag and drop attacker-controlled content into the editor, requiring social engineering (e.g., luring the user to drag a crafted element from an attacker-controlled page or iframe). Applications deploying server-side HTML sanitization (such as Rails ActionText's default sanitizer) gain an additional mitigating layer that strips javascript: URIs when content is persisted, limiting impact to the unsaved in-memory session. Authentication requirements are not determinable from CVSS PR:N alone; that metric reflects the attacker's privilege level, not whether the editor itself requires a logged-in session.

Impact

Real-world risk is low, and the CVSS 4.0 score of 2.1 reflects this accurately. The vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N encodes three hard constraints: AT:P (a specific environmental condition - Level0InputController fallback - must be present), UI:A (the victim must actively perform a drag-and-drop of attacker-controlled content), and limited impact (VI:L only; no confidentiality or availability loss). Applications using standard Rails ActionText receive server-side sanitization as an additional layer that neutralizes the payload on save, further reducing effective exposure. No EPSS score was present in the input data, so probabilistic exploitation likelihood cannot be quantified. The vulnerability is absent from CISA KEV, and no public exploit code has been identified. The combination of a non-default environment, mandatory social engineering, and readily available mitigations makes this a low-priority finding for most production deployments, though WebView-heavy mobile applications embedding Trix editors should treat it with higher urgency.

Exploit ScenarioDerived

An attacker hosts a web page containing a draggable element whose MIME type is application/x-trix-document and whose JSON body encodes a string piece with href set to javascript:alert(document.cookie). A victim using a mobile application that embeds a Trix editor in a WebView drags this element into the editor; the Level0InputController processes the drop, deserializes the JSON via StringPiece.fromJSON, and inserts an anchor element with the unsanitized javascript: href into the DOM. When the victim clicks the rendered link text, the script executes in the application's WebView context with access to the page's cookies and DOM.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 12, 2026

Cross-site scripting in Trix editor prior to 2.1.18 allows DOM injection via unsanitized javascript: URIs deserialized from attacker-controlled JSON payloads during drag-and-drop operations. The vulnerable path exists exclusively in environments using the Level0InputController fallback - such as embedded WebViews lacking Input Events Level 2 support - where StringPiece.fromJSON applied href attributes from application/x-trix-document JSON directly to anchor elements, bypassing the DOMPurify checks that protected the HTML serialization path. No public exploit or active exploitation (CISA KEV) has been identified; the CVSS 4.0 score of 2.1 accurately reflects the constrained exploitability.

RemediationAI

Upgrade to Trix version 2.1.18 or later, available for npm via npm install trix@2.1.18 and for RubyGems via updating the action_text-trix gem to >= 2.1.18; the tagged release is at https://github.com/basecamp/trix/releases/tag/v2.1.18. Where immediate upgrade is not feasible, two compensating controls apply: first, ensure server-side HTML sanitization is active - Rails ActionText's default sanitizer strips javascript: URIs on content save, neutralizing stored payloads at the cost of requiring a save action before the protection takes effect (unsaved in-memory XSS execution still occurs prior to save); second, restrict Trix deployments to environments with full Input Events Level 2 support, which prevents the Level0InputController from activating and eliminates the vulnerable code path entirely, though this may break editor functionality in legitimate WebView contexts.

Affected VersionsENISA

trix < 2.1.18

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
euvd trix fix: 2.1.18

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, rubygems, euvd

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 both an npm package (trix) and a RubyGems package (action_text-trix) tightly integrated with Rails ActionText. The vulnerability resides in src/trix/models/string_piece.js within the StringPiece.fromJSON deserialization method, which reconstructs editor document model objects from application/x-trix-document JSON. When content is dropped via drag-and-drop in environments falling back to Level0InputController - the legacy input path used in WebViews or iframes without the Input Events Level 2 API - the deserialized href attribute bypassed DOMPurify validation entirely, as DOMPurify was only applied on the HTML serialization path, not the JSON deserialization path. CWE-79 (Improper Neutralization of Input During Web Page Generation) describes this root cause: untrusted data entering a deserialization routine that feeds directly into DOM construction without URI scheme validation. The fix (commit 9c0a993) adds a DOMPurify.isValidAttribute('a', 'href', value) guard inside StringPiece.fromJSON, stripping any href that DOMPurify rejects, including javascript: in plain, mixed-case, and whitespace-padded forms as verified by the new test suite.

Know when Trix gets its next vulnerability

  • 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_M) PRIMARY 2.1 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 3.1 LOW

AC:H reflects the required Level0InputController environment; UI:R for mandatory drag-and-drop; no confidentiality or availability impact; scope unchanged as XSS executes within the same page context.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Aug 12, 2026 - 22:03 EUVD

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 cross-site scripting when a crafted application/x-trix-document JSON payload is dropped into an editor using the fallback Level0InputController, such as an embedded WebView without Input Events Level 2 support. The StringPiece.fromJSON method trusts href attributes from the JSON payload without sanitization, allowing a draggable element containing a javascript: URI to bypass DOMPurify sanitization and inject executable JavaScript into the DOM. Exploitation requires the victim to drag and drop attacker-controlled content, and 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.3%
Top 75% exploitable
Prevalence
Medium
default rich text editor for Ruby on Rails ActionText, moderately deployed
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment 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 LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
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.

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