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.
History

Thu, 15 Aug 2024 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Basecamp
Basecamp trix
CPEs cpe:2.3:a:basecamp:trix:*:*:*:*:*:*:*:*
Vendors & Products Basecamp
Basecamp trix
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 14 Aug 2024 21:30:00 +0000

Type Values Removed Values Added
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.
Title Trix has a Cross-Site Scripting (XSS) vulnerability on copy & paste
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published: 2024-08-14T21:12:24.240Z

Updated: 2024-08-15T15:00:00.907Z

Reserved: 2024-08-09T14:23:55.513Z

Link: CVE-2024-43368

cve-icon Vulnrichment

Updated: 2024-08-15T14:59:45.666Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2024-08-14T22:15:04.497

Modified: 2024-08-15T13:01:10.150

Link: CVE-2024-43368

cve-icon Redhat

No data.