CVE-2026-73427
JSON

2.1low

Trix: XSS via JSON deserialization bypass in drag-and-drop (Level0InputController)

Severity
2.1low CVSS:4.0 by GitHub_M
Exploit likelihood
0.33% (higher than 27% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-53p3-c7vp-4mcc

Description

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.

Affected

Product or packageVersionsReported by
basecamp trix< 2.1.18CVE List
trix (npm)before 2.1.18GitHub Advisory Database
action_text-trix (RubyGems)before 2.1.18GitHub Advisory Database

All scores

GitHub_M2.1low CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
GitHublow CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

The Trix editor, in versions prior to 2.1.18, is vulnerable to XSS when a crafted application/x-trix-document JSON payload is dropped into the editor in environments using the fallback Level0InputController (e.g., embedded WebViews lacking Input Events Level 2 support).

The StringPiece.fromJSON method trusted href attributes from the JSON payload without sanitization. An attacker could craft a draggable element containing a javascript: URI in the href attribute that, when dropped into a vulnerable editor, would bypass DOMPurify sanitization and inject executable JavaScript into the DOM.

Exploitation requires a specific environment (Level0InputController fallback) and social engineering (victim must drag and drop attacker-controlled content into the editor). Applications using server-side HTML sanitization (such as Rails' built-in sanitizer) are additionally protected, as the payload is neutralized on save.

Patches

Update Recommendation: Users should upgrade to Trix editor version 2.1.18 or later.

References

The XSS vulnerability was responsibly reported by Hackerone researcher newbiefromcoma.

NVD (es)

Trix es un editor de texto enriquecido ’lo que ves es lo que obtienes’ para la escritura diaria. Antes de la versión 2.1.18, Trix es vulnerable a cross-site scripting cuando una carga útil JSON application/x-trix-document manipulada se introduce en un editor que utiliza el controlador de entrada de respaldo Level0InputController, como un WebView incrustado sin soporte para Eventos de Entrada Nivel 2. El método StringPiece.fromJSON confía en los atributos href de la carga útil JSON sin saneamiento, permitiendo que un elemento arrastrable que contiene una URI javascript_disabled: omita el saneamiento de DOMPurify e inyecte JavaScript ejecutable en el DOM. La explotación requiere que la víctima arrastre y suelte contenido controlado por el atacante, y el saneamiento HTML del lado del servidor puede neutralizar la carga útil al guardar. Este problema está solucionado en la versión 2.1.18.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-73427 changed 2026-08-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-53p3-c7vp-4mcc changed 2026-09-10CC-BY-4.0
NVDCVE-2026-73427 changed 2026-10-24Public domain