{"id":"CVE-2026-73427","aliases":["CVE-2026-73427","GHSA-53p3-c7vp-4mcc"],"related":[],"kind":"vulnerability","state":"published","title":"Trix: XSS via JSON deserialization bypass in drag-and-drop (Level0InputController)","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe 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).\n\nThe `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.\n\nExploitation 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.\n\n### Patches\n\nUpdate Recommendation: Users should upgrade to Trix editor version 2.1.18 or later.\n\n\n### References\n\nThe XSS vulnerability was responsibly reported by Hackerone researcher [newbiefromcoma](https://hackerone.com/newbiefromcoma).","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-03-29T15:22:17.000Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":2.1,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":2.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"LOW"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 2.1.18","status":"affected"}],"vendor":"basecamp","product":"trix","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.18"}],"ecosystem":"npm","package":"trix","purl":"pkg:npm/trix","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.1.18"}],"ecosystem":"RubyGems","package":"action_text-trix","purl":"pkg:gem/action_text-trix","source":"ghsa"}],"references":[{"url":"https://github.com/basecamp/trix/security/advisories/GHSA-53p3-c7vp-4mcc","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/basecamp/trix/pull/1293","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/basecamp/trix/commit/9c0a993d9fc2ffe9d56b013b030bc238f9c0557c","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/basecamp/trix/releases/tag/v2.1.18","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/basecamp/trix","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/action_text-trix/GHSA-53p3-c7vp-4mcc.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-13T13:51:16.963Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-73427","url":"https://www.cve.org/CVERecord?id=CVE-2026-73427","licence":"CVE Terms of Use","modified":"2026-08-13T13:51:28.767Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-53p3-c7vp-4mcc","url":"https://github.com/advisories/GHSA-53p3-c7vp-4mcc","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:59.722Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-73427","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73427","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:32.661Z","epss":{"score":0.00326,"percentile":0.27726,"date":"2026-12-01T12:00:22.000Z"}}