{"id":"CVE-2026-73428","aliases":["CVE-2026-73428","GHSA-53g2-mvcc-q9x3"],"related":[],"kind":"vulnerability","state":"published","title":"Trix: Stored XSS via HTMLParser attribute injection on paste","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 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.","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 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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe Trix editor, in versions prior to 2.1.18, is vulnerable to XSS when crafted HTML is pasted into the editor. The `HTMLParser` processed a mock attachment, a `<span>` carrying an empty `data-trix-attachment=\"{}\"`. The empty attachment object caused the element to bypass attachment handling, so its `data-trix-attributes` were applied to a plain string piece. The pre-2.1.18 `StringPiece.fromJSON` accepted the `href` without validation, so an attacker-supplied `javascript:` URI was carried into the document model and emitted verbatim into the serialized HTML, executing when the content was rendered and clicked.\n\nThis is a stored XSS in any application that accepts untrusted rich text through Trix and renders the serialized output to other users. Applications that apply server-side HTML sanitization, such as the Rails built-in sanitizer, are additionally protected because the payload is neutralized on save.\n\nThis vulnerability shares its fix with GHSA-53p3-c7vp-4mcc. Both are resolved by the `StringPiece.fromJSON` sanitization added in 2.1.18. This advisory covers the paste and HTMLParser entry vector, while GHSA-53p3-c7vp-4mcc covers the drag-and-drop path through the fallback Level0InputController.\n\n### Patches\n\nUsers should upgrade to Trix editor version 2.1.18 or later.\n\n### References\n\nThe vulnerability was responsibly reported by HackerOne researcher [newbiefromcoma](https://hackerone.com/newbiefromcoma).","format":"markdown","source":"ghsa"}],"published":"2026-07-24T16:18:01.000Z","modified":"2026-09-18T20:09:01.757Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"}],"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-53g2-mvcc-q9x3","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"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-14T17:39:35.455Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-73428","url":"https://www.cve.org/CVERecord?id=CVE-2026-73428","licence":"CVE Terms of Use","modified":"2026-08-14T18:06:36.864Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-53g2-mvcc-q9x3","url":"https://github.com/advisories/GHSA-53g2-mvcc-q9x3","licence":"CC-BY-4.0","modified":"2026-08-12T21:11:05.764Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-73428","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73428","licence":"Public domain","modified":"2026-09-18T20:09:01.757Z"}],"updatedAt":"2026-11-25T22:59:32.880Z","epss":{"score":0.00203,"percentile":0.10789,"date":"2026-12-01T12:00:22.000Z"}}