From 497f4c711c284202decbbe7f8b93e0a290fc1367 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 14:21:47 +0000 Subject: [PATCH] Publish GHSA-qjqp-xr96-cj99 --- .../GHSA-qjqp-xr96-cj99.json | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/advisories/github-reviewed/2024/05/GHSA-qjqp-xr96-cj99/GHSA-qjqp-xr96-cj99.json b/advisories/github-reviewed/2024/05/GHSA-qjqp-xr96-cj99/GHSA-qjqp-xr96-cj99.json index 055a67ec9ff..d31a2c5a4a7 100644 --- a/advisories/github-reviewed/2024/05/GHSA-qjqp-xr96-cj99/GHSA-qjqp-xr96-cj99.json +++ b/advisories/github-reviewed/2024/05/GHSA-qjqp-xr96-cj99/GHSA-qjqp-xr96-cj99.json @@ -1,13 +1,13 @@ { "schema_version": "1.4.0", "id": "GHSA-qjqp-xr96-cj99", - "modified": "2024-05-07T18:48:11Z", + "modified": "2024-05-15T14:20:37Z", "published": "2024-05-07T16:49:24Z", "aliases": [ "CVE-2024-34341" ], "summary": "Trix Editor Arbitrary Code Execution Vulnerability", - "details": "The Trix editor, versions prior to 2.1.1, is vulnerable to arbitrary code execution when copying and pasting content from the web or other documents with markup into the editor. The vulnerability stems from improper sanitization of pasted content, allowing an attacker to embed malicious scripts which are executed within the context of the application.\n\n**Vulnerable Versions**: Up to 2.1.0\n\n**Fixed Version**: 2.1.1\n\n**Vector**:\n\n- **Bug 1**: When copying content manipulated by a script, such as:\n\n```js\ndocument.addEventListener('copy', function(e){\n e.clipboardData.setData('text/html', '
');\n e.preventDefault();\n});\n```\n\nand pasting into the Trix editor, the script within the content is executed.\n\n- **Bug 2**: Similar execution occurs with content structured as:\n\n```js\ndocument.write(`copyme`);\n```\n\n### Impact:\nAn attacker could exploit these vulnerabilities to 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### Remediation:\n\n**Update Recommendation**: Users should upgrade to Trix editor version 2.1.1 or later, which incorporates proper sanitization of input from copied content.\n\n**CSP Enhancement**: Additionally, enhancing the Content Security Policy (CSP) to disallow inline scripts can significantly mitigate the risk of such 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 - https://github.com/basecamp/trix/releases/tag/v2.1.1\n - https://github.com/basecamp/trix/pull/1147\n - https://github.com/basecamp/trix/pull/1149\n\n**Credit**: These issues were reported by security researchers [loknop](https://hackerone.com/loknop) and [pinpie](https://hackerone.com/pinpie).", + "details": "The Trix editor, versions prior to 2.1.1, is vulnerable to arbitrary code execution when copying and pasting content from the web or other documents with markup into the editor. The vulnerability stems from improper sanitization of pasted content, allowing an attacker to embed malicious scripts which are executed within the context of the application.\n\n**Vulnerable Versions**: \n\n- 1.x series up to and including 1.3.1\n- 2.x series up to and including 2.1.0\n\n**Fixed Versions**: \n\n- v1.3.2\n- v2.1.1\n\n**Vector**:\n\n- **Bug 1**: When copying content manipulated by a script, such as:\n\n```js\ndocument.addEventListener('copy', function(e){\n e.clipboardData.setData('text/html', '');\n e.preventDefault();\n});\n```\n\nand pasting into the Trix editor, the script within the content is executed.\n\n- **Bug 2**: Similar execution occurs with content structured as:\n\n```js\ndocument.write(`copyme`);\n```\n\n### Impact:\nAn attacker could exploit these vulnerabilities to 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### Remediation:\n\n**Update Recommendation**: Users should upgrade to Trix editor version 2.1.1 or later, which incorporates proper sanitization of input from copied content.\n\n**CSP Enhancement**: Additionally, enhancing the Content Security Policy (CSP) to disallow inline scripts can significantly mitigate the risk of such 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 - https://github.com/basecamp/trix/releases/tag/v2.1.1\n - https://github.com/basecamp/trix/pull/1147\n - https://github.com/basecamp/trix/pull/1149\n - https://github.com/basecamp/trix/pull/1153\n\n**Credit**: These issues were reported by security researchers [loknop](https://hackerone.com/loknop) and [pinpie](https://hackerone.com/pinpie).", "severity": [ { "type": "CVSS_V3", @@ -25,7 +25,7 @@ "type": "ECOSYSTEM", "events": [ { - "introduced": "0" + "introduced": "2.0.0" }, { "fixed": "2.1.1" @@ -33,6 +33,25 @@ ] } ] + }, + { + "package": { + "ecosystem": "npm", + "name": "trix" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0.9.0" + }, + { + "fixed": "1.3.2" + } + ] + } + ] } ], "references": [