{"id":"CVE-2024-53847","aliases":["CVE-2024-53847","GHSA-6vx4-v2jw-qwqh"],"related":[],"kind":"vulnerability","state":"published","title":"Trix vulnerable to Cross-site Scripting on copy & paste","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Trix rich text editor, anterior a las versiones 2.1.9 y 1.3.3, es vulnerable a ataques de Cross Site Scripting (XSS) + mutación XSS al pegar código malicioso. Un atacante podría engañar a un usuario para que copie y pegue código malicioso que ejecutaría código JavaScript arbitrario dentro del contexto de la sesión del usuario, lo que podría provocar que se realicen acciones no autorizadas o que se divulgue información confidencial. Los usuarios deben actualizar a la versión 2.1.9 o 1.3.3 del editor Trix, que utiliza DOMPurify para desinfectar el contenido pegado.","source":"nvd"}],"published":"2024-12-09T18:49:37.339Z","modified":"2026-06-17T08:09:24.687Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 2.0.0, < 2.1.9","status":"affected"},{"version":">= 1.0.0, < 1.3.3","status":"affected"}],"vendor":"basecamp","product":"trix","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.1.9"}],"ecosystem":"npm","package":"trix","purl":"pkg:npm/trix","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.3.3"}],"ecosystem":"npm","package":"trix","purl":"pkg:npm/trix","source":"ghsa"}],"references":[{"url":"https://github.com/basecamp/trix/security/advisories/GHSA-6vx4-v2jw-qwqh","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/basecamp/trix/commit/272c7e27e722608732a67108ad3fe7870e233ac8","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53847","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/basecamp/trix","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-12-10T16:15:17.901Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-53847","url":"https://www.cve.org/CVERecord?id=CVE-2024-53847","licence":"CVE Terms of Use","modified":"2024-12-10T16:15:40.972Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6vx4-v2jw-qwqh","url":"https://github.com/advisories/GHSA-6vx4-v2jw-qwqh","licence":"CC-BY-4.0","modified":"2024-12-09T21:53:54.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-53847","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53847","licence":"Public domain","modified":"2026-06-17T08:09:24.687Z"}],"updatedAt":"2026-11-25T22:58:49.852Z","epss":{"score":0.00463,"percentile":0.41803,"date":"2026-12-01T12:00:22.000Z"}}