CVE-2026-73427
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-73427 is a cross-site scripting (XSS) vulnerability in the Trix WYSIWYG rich text editor developed by Basecamp. It affects all versions of the trix (npm) and action_text-trix (RubyGems) packages prior to 2.1.18. The flaw was disclosed on March 26, 2026, via a GitHub Security Advisory, and a fix was released the same day in version 2.1.18. It carries a CVSS v4.0 base score of 2.1 (Low), reflecting the significant exploitation preconditions required (GitHub Advisory).

Technical details

The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), specifically in the StringPiece.fromJSON method, which deserialized application/x-trix-document JSON payloads and trusted href attributes without sanitization. In environments using the fallback Level0InputController — such as embedded WebViews lacking Input Events Level 2 support — an attacker could craft a draggable element with a javascript: URI in the href attribute. When a victim drags and drops this attacker-controlled content into the editor, the malicious URI bypasses DOMPurify sanitization at the rendering stage because the unsanitized value was already embedded in the document model during deserialization. The fix adds a DOMPurify.isValidAttribute("a", "href", ...) check at deserialization time in StringPiece.fromJSON, stripping invalid href values before they can propagate to the DOM (GitHub PR #1293, Commit 9c0a993).

Impact

Successful exploitation allows an attacker to inject and execute arbitrary JavaScript in the context of the victim's browser session within the application hosting the Trix editor. This could lead to session hijacking, credential theft, or unauthorized actions performed on behalf of the victim. The integrity impact is limited (low), with no direct confidentiality or availability impact assessed by the CVSS v4.0 scoring. Applications using server-side HTML sanitization (e.g., Rails' built-in sanitizer) receive an additional layer of protection, as the payload would be neutralized upon saving (GitHub Advisory).

Exploitability

No public exploit code or in-the-wild exploitation has been reported as of the disclosure date. The vulnerability was responsibly disclosed by a HackerOne researcher identified as newbiefromcoma. Exploitation requires two significant preconditions: the target application must use the Level0InputController fallback (e.g., an embedded WebView without Input Events Level 2 support), and the victim must be socially engineered into dragging and dropping attacker-controlled content into the editor. The EPSS score is approximately 0.33%, indicating a low probability of exploitation in the near term. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory).

Exploitation steps

  1. Identify a vulnerable target: Locate a web application or mobile app using Trix editor versions prior to 2.1.18 that renders the editor within an environment using the Level0InputController fallback, such as an embedded WebView without Input Events Level 2 support.
  2. Craft a malicious payload: Construct a valid application/x-trix-document JSON payload containing a StringPiece with a javascript: URI in the href attribute, for example: [{"text": [{"type": "string", "string": "Click me", "attributes": {"href": "javascript:alert(document.cookie)"}}], "attributes": [], "htmlAttributes": {}}].
  3. Create a draggable element: Host or embed the crafted payload in a draggable HTML element (e.g., a <div draggable="true"> with the MIME type application/x-trix-document) on an attacker-controlled page or resource accessible to the victim.
  4. Social engineer the victim: Convince the victim to drag the attacker-controlled element and drop it into the vulnerable Trix editor instance.
  5. Trigger XSS: Upon drop, the Level0InputController deserializes the JSON payload via StringPiece.fromJSON, which trusts the href attribute without sanitization. The javascript: URI is embedded in the document model and later rendered into the DOM, executing the injected JavaScript in the victim's browser context (GitHub Advisory, GitHub PR #1293).

Indicators of compromise

  • Network: Unexpected outbound requests from the victim's browser to attacker-controlled domains following a drag-and-drop interaction with a Trix editor (e.g., cookie exfiltration via GET requests to external URLs).
  • Logs: Application logs showing application/x-trix-document content being submitted containing href values with javascript: URI schemes; browser console errors related to DOMPurify or unexpected script execution in the editor context.
  • File System / Storage: Saved Trix editor content in the database containing <a href="javascript:..." tags, indicating server-side sanitization was not applied or was bypassed.
  • Process/Browser Behavior: Unexpected JavaScript execution (e.g., alert dialogs, redirects, or network requests) triggered immediately after a drag-and-drop action into a Trix editor field.

Mitigation and workarounds

The primary remediation is to upgrade the trix npm package or action_text-trix RubyGem to version 2.1.18 or later, which adds DOMPurify.isValidAttribute validation at JSON deserialization time to strip unsafe href values (GitHub Release v2.1.18). As a defense-in-depth measure, applications should ensure server-side HTML sanitization is enabled (e.g., Rails' built-in sanitizer via ActionText), which neutralizes the payload upon saving even if client-side sanitization is bypassed. There is no known configuration-based workaround that fully mitigates the client-side risk without upgrading.

Community reactions

The vulnerability was responsibly reported to Basecamp via HackerOne by researcher newbiefromcoma and was patched and disclosed on the same day (March 26, 2026) with minimal public fanfare, consistent with its low severity rating. No significant broader media coverage or notable researcher commentary beyond the official advisory has been identified.

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-54155HIGH7.7
  • JavaScript logoJavaScript
  • node-opcua
NoNoAug 20, 2026
CVE-2026-54156HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 20, 2026
CVE-2026-55451MEDIUM6.9
  • JavaScript logoJavaScript
  • gettext-converter
NoYesAug 20, 2026
CVE-2026-54150MEDIUM6.9
  • JavaScript logoJavaScript
  • next-video
NoYesAug 20, 2026
GHSA-ghvf-qf6h-g8x5HIGHN/A
  • JavaScript logoJavaScript
  • @nocobase/server
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management