# CVE-2024-43368: Trix has a Cross-Site Scripting (XSS) vulnerability on copy & paste

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Published: 2024-08-14T18:11:53.000Z
- Modified: 2026-06-17T07:50:53.970Z
- Also known as: GHSA-qm2q-9f3q-2vcv
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

The Trix editor, versions prior to 2.1.4, is vulnerable to XSS when pasting malicious code. This vulnerability is a bypass of the fix put in place for GHSA-qjqp-xr96-cj99. In pull request 1149, sanitation was added for Trix attachments with a `text/html` content type. However, Trix only checks the content type on the paste event's `dataTransfer` object. As long as the `dataTransfer` has a content type of `text/html`, Trix parses its contents and creates an `Attachment` with them, even if the attachment itself doesn't have a `text/html` content type. Trix then uses the attachment content to set the attachment element's `innerHTML`. 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. This vulnerability was fixed in version 2.1.4.

(As written by CVE List.)

## Affected

- basecamp trix: < 2.1.4; before 2.1.4
- trix (npm): before 2.1.4

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`

## References

- <https://github.com/basecamp/trix/security/advisories/GHSA-qm2q-9f3q-2vcv> (web)
- <https://github.com/basecamp/trix/security/advisories/GHSA-qjqp-xr96-cj99> (web)
- <https://github.com/basecamp/trix/pull/1149> (web)
- <https://github.com/basecamp/trix/pull/1156> (web)
- <https://github.com/basecamp/trix/commit/7656f578af0d03141a72a9d27cb3692e6947dae6> (web)
- <https://github.com/basecamp/trix/releases/tag/v2.1.4> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-43368> (advisory)
- <https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer> (web)
- <https://github.com/basecamp/trix> (package)

## Sources

- CVE List: [CVE-2024-43368](https://www.cve.org/CVERecord?id=CVE-2024-43368), CVE Terms of Use, modified 2024-08-15
- GitHub Advisory Database: [GHSA-qm2q-9f3q-2vcv](https://github.com/advisories/GHSA-qm2q-9f3q-2vcv), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2024-43368](https://nvd.nist.gov/vuln/detail/CVE-2024-43368), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-43368 · Whole record: https://cve.day/CVE-2024-43368.json · Rebuilt by cve.day 2026-11-25T22:58:44.390Z
