{"id":"CVE-2024-53847","aliases":["EUVD-2024-3438","GHSA-6vx4-v2jw-qwqh"],"status":"published","title":"Trix vulnerable to Cross-site Scripting on copy \u0026 paste","description":"The Trix rich text editor, prior to versions 2.1.9 and 1.3.3, is vulnerable to cross-site scripting (XSS) + mutation XSS attacks when pasting malicious code. An attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed. Users should upgrade to Trix editor version 2.1.9 or 1.3.3, which uses DOMPurify to sanitize the pasted content.","severity":{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00463,"percentile":0.40425,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2024-12-09T18:49:37Z","modified":"2026-11-11T02:47:37Z","fixes":[{"ecosystem":"npm","package":"trix","fixed_in":["2.1.9","1.3.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"trix","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.1.9"}]}]},{"source":"ghsa","ecosystem":"npm","package":"trix","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0"},{"fixed":"1.3.3"}]}]},{"source":"osv","ecosystem":"npm","package":"trix","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.1.9"}]}]},{"source":"osv","ecosystem":"npm","package":"trix","ranges":[{"type":"SEMVER","events":[{"introduced":"1.0.0"},{"fixed":"1.3.3"}]}]}],"products":[{"vendor":"basecamp","product":"trix"}],"references":[{"url":"https://github.com/basecamp/trix/security/advisories/GHSA-6vx4-v2jw-qwqh","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/basecamp/trix/commit/272c7e27e722608732a67108ad3fe7870e233ac8","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53847","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-6vx4-v2jw-qwqh"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53847.json","tags":["advisory"]},{"url":"https://github.com/basecamp/trix","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-53847","title":"Trix vulnerable to Cross-site Scripting on copy \u0026 paste","description":"The Trix rich text editor, prior to versions 2.1.9 and 1.3.3, is vulnerable to cross-site scripting (XSS) + mutation XSS attacks when pasting malicious code. An attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed. Users should upgrade to Trix editor version 2.1.9 or 1.3.3, which uses DOMPurify to sanitize the pasted content.","status":"published","published":"2024-12-09T18:49:37.339Z","modified":"2024-12-10T16:15:40.972Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:34:17.523201Z"}],"euvd":[{"id":"EUVD-2024-3438","description":"The Trix rich text editor, prior to versions 2.1.9 and 1.3.3, is vulnerable to cross-site scripting (XSS) + mutation XSS attacks when pasting malicious code. An attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed. Users should upgrade to Trix editor version 2.1.9 or 1.3.3, which uses DOMPurify to sanitize the pasted content.","status":"published","published":"2024-12-09T18:49:37Z","modified":"2024-12-10T16:15:40Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"updated_at":"2026-11-03T00:04:37.743244Z"}],"ghsa":[{"id":"GHSA-6vx4-v2jw-qwqh","title":"Trix editor subject to XSS vulnerabilities on copy \u0026 paste","description":"The Trix editor, in versions prior to 2.1.9 and 1.3.3, is vulnerable to XSS + mutation XSS attacks when pasting malicious code.\n\n### Impact\n\nAn attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed.\n\n### Patches\n\nUpdate Recommendation: Users should upgrade to Trix editor version 2.1.9 or later, which uses [DOMPurify](https://github.com/cure53/DOMPurify) to sanitize the pasted content. \n\nIf using Trix 1.x, upgrade to version 1.3.3 or later.\n\n### Mitigations\n\nThis is not really a workaround but something that should be considered in addition to upgrading to the patched version. If affected users can disallow browsers that don't support a Content Security Policy, then this would be an effective workaround for this and all XSS vulnerabilities. Set CSP policies such as script-src 'self' to ensure that only scripts hosted on the same origin are executed, and explicitly prohibit inline scripts using script-src-elem.\n\n### References\n\nThe XSS vulnerability was reported by HackerOne researcher [hiumee](https://hackerone.com/hiumee?type=user).\nThe mutation XSS vulnerability was reported by HackerOne researcher [sudi](https://hackerone.com/sudi?type=user).\n\n","status":"published","published":"2024-12-09T20:38:42Z","modified":"2024-12-09T21:53:55Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:38:24.542211Z"}],"nvd":[{"id":"CVE-2024-53847","description":"The Trix rich text editor, prior to versions 2.1.9 and 1.3.3, is vulnerable to cross-site scripting (XSS) + mutation XSS attacks when pasting malicious code. An attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed. Users should upgrade to Trix editor version 2.1.9 or 1.3.3, which uses DOMPurify to sanitize the pasted content.","status":"published","published":"2024-12-09T19:15:14.387Z","modified":"2026-06-17T08:09:24.687Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:10:39.434419Z"}],"osv":[{"id":"CVE-2024-53847","title":"Trix vulnerable to Cross-site Scripting on copy \u0026 paste","description":"The Trix rich text editor, prior to versions 2.1.9 and 1.3.3, is vulnerable to cross-site scripting (XSS) + mutation XSS attacks when pasting malicious code. An attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed. Users should upgrade to Trix editor version 2.1.9 or 1.3.3, which uses DOMPurify to sanitize the pasted content.","status":"published","published":"2024-12-09T18:49:37.339Z","modified":"2026-11-11T02:47:37.840611224Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-11T03:22:28.447808Z"},{"id":"GHSA-6vx4-v2jw-qwqh","title":"Trix editor subject to XSS vulnerabilities on copy \u0026 paste","description":"The Trix editor, in versions prior to 2.1.9 and 1.3.3, is vulnerable to XSS + mutation XSS attacks when pasting malicious code.\n\n### Impact\n\nAn attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed.\n\n### Patches\n\nUpdate Recommendation: Users should upgrade to Trix editor version 2.1.9 or later, which uses [DOMPurify](https://github.com/cure53/DOMPurify) to sanitize the pasted content. \n\nIf using Trix 1.x, upgrade to version 1.3.3 or later.\n\n### Mitigations\n\nThis is not really a workaround but something that should be considered in addition to upgrading to the patched version. If affected users can disallow browsers that don't support a Content Security Policy, then this would be an effective workaround for this and all XSS vulnerabilities. Set CSP policies such as script-src 'self' to ensure that only scripts hosted on the same origin are executed, and explicitly prohibit inline scripts using script-src-elem.\n\n### References\n\nThe XSS vulnerability was reported by HackerOne researcher [hiumee](https://hackerone.com/hiumee?type=user).\nThe mutation XSS vulnerability was reported by HackerOne researcher [sudi](https://hackerone.com/sudi?type=user).\n\n","status":"published","published":"2024-12-09T20:38:42Z","modified":"2024-12-09T21:53:54Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:40.308826Z"}]}}
