{"answers":{"affected":"2 open source packages ship an affected version, including trix.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-43368 exists.","fix":"Upgrade trix to 2.1.4 or later.","what":"CVE-2024-43368 is a medium-severity cross-site scripting vulnerability in basecamp trix, published on 14 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-43368 and fix it if it is affected.\n\nWhat it is: CVE-2024-43368 is a medium-severity cross-site scripting vulnerability in basecamp trix, published on 14 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-43368 exists.\n\nAffected packages and fixed versions:\n- trix (npm): affected all versions; fixed in 2.1.4\n- trix (npm): affected all versions; fixed in 2.1.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-43368/ (Markdown: https://insights.sbomify.com/CVE-2024-43368/index.md)","id":"CVE-2024-43368","markdown":"https://insights.sbomify.com/CVE-2024-43368/index.md","name":"CVE-2024-43368","record":{"aliases":["GHSA-qm2q-9f3q-2vcv"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Trix rich text editor","requires_auth":"none","summary":"An attacker can execute arbitrary JavaScript via malicious copy-paste content in the Trix editor, potentially leading to session hijacking or data theft.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Trix has a Cross-Site Scripting (XSS) vulnerability on copy \u0026 paste","id":"CVE-2024-43368","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":2,"n_references":6,"next":{"headline":"Persistent Cross-site Scripting in Ibexa RichText Field Type","id":"CVE-2024-43369"},"packages":[{"ecosystem":"npm","fixed":["2.1.4"],"introduced":["0"],"last_affected":[],"package":"trix","purl":null,"source":"GHSA-qm2q-9f3q-2vcv"},{"ecosystem":"npm","fixed":["2.1.4"],"introduced":["0"],"last_affected":[],"package":"trix","purl":"pkg:npm/trix","source":"GHSA-qm2q-9f3q-2vcv"}],"prev":{"headline":"Boa has an uncaught exception when transitioning the state of `AsyncGenerator` objects","id":"CVE-2024-43367"},"products":["trix"],"published":"2024-08-14","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-15","vendors":["basecamp"]},"summary":"An attacker can execute arbitrary JavaScript via malicious copy-paste content in the Trix editor, potentially leading to session hijacking or data theft.","url":"https://insights.sbomify.com/CVE-2024-43368/"}