{"answers":{"affected":"6 open source packages ship an affected version, including @udecode/plate-core.","exploited":"There is no known exploitation of CVE-2024-47061 in the wild and no public exploit code.","fix":"Upgrade @udecode/plate-core to a fixed version for your release line: 21.5.1, 36.5.9 or 38.0.6.","what":"CVE-2024-47061 is a high-severity cross-site scripting vulnerability in udecode plate, published on 20 Sep 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-47061 and fix it if it is affected.\n\nWhat it is: CVE-2024-47061 is a high-severity cross-site scripting vulnerability in udecode plate, published on 20 Sep 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-47061 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @udecode/plate-core (npm): affected all versions; fixed in 21.5.1\n- @udecode/plate-core (npm): affected all versions; fixed in 21.5.1\n- @udecode/plate-core (npm): affected from 22.0.0; fixed in 36.5.9\n- @udecode/plate-core (npm): affected from 22.0.0; fixed in 36.5.9\n- @udecode/plate-core (npm): affected from 37.0.0; fixed in 38.0.6\n- @udecode/plate-core (npm): affected from 37.0.0; fixed in 38.0.6\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-47061/ (Markdown: https://insights.sbomify.com/CVE-2024-47061/index.md)","id":"CVE-2024-47061","markdown":"https://insights.sbomify.com/CVE-2024-47061/index.md","name":"CVE-2024-47061","record":{"aliases":["GHSA-73rg-f94j-xvhx"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript text editor library","requires_auth":"low_privilege","summary":"Attackers can inject malicious DOM attributes into Plate.js editors, leading to cross-site scripting and potential information disclosure of user IP addresses.","user_interaction":"not_required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.3,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Plate is a javascript toolkit that makes it easier for you to develop with Slate, a popular framework for building text editors. One longstanding feature of Plate is the ability to add custom DOM attributes to any element or leaf using the `attributes` property. These attributes are passed to the node component using the `nodeProps` prop. It has come to our attention that this feature can be used for malicious purposes, including cross-site scripting (XSS) and information exposure (specifically, users' IP addresses and whether or not they have opened a malicious document). Note that the risk of information exposure via attributes is only relevant to applications in which web requests to arbitrary URLs are not ordinarily allowed. Plate editors that allow users to embed images from arbitrary URLs, for example, already carry the risk of leaking users' IP addresses to third parties. All Plate editors using an affected version of @udecode/plate-core are vulnerable to these information exposure attacks via the style attribute and other attributes that can cause web requests to be sent. In addition, whether or not a Plate editor is vulnerable to cross-site scripting attacks using attributes depends on a number of factors. The most likely DOM attributes to be vulnerable are href and src on links and iframes respectively. Any component that spreads {...nodeProps} onto an \u003ca\u003e or \u003ciframe\u003e element and does not later override href or src will be vulnerable to XSS. In patched versions of Plate, we have disabled element.attributes and leaf.attributes for most attribute names by default, with some exceptions including target, alt, width, height, colspan and rowspan on the link, image, video, table cell and table header cell plugins. If this is a breaking change for you, you can selectively re-enable attributes for certain plugins as follows. Please carefully research and assess the security implications of any attribute you allow, as even seemingly innocuous attributes such as style can be used maliciously. If you are unable to upgrade to any of the patched versions, you should use a tool like patch-package or yarn patch to remove the logic from @udecode/plate-core that adds attributes to nodeProps.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Arbitrary DOM attributes in element.attributes and leaf.attributes in Platejs","id":"CVE-2024-47061","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":6,"n_references":3,"next":{"headline":"Multiple SQL Injections and ORM Leak in navidrome","id":"CVE-2024-47062"},"packages":[{"ecosystem":"npm","fixed":["21.5.1"],"introduced":["0"],"last_affected":[],"package":"@udecode/plate-core","purl":null,"source":"GHSA-73rg-f94j-xvhx"},{"ecosystem":"npm","fixed":["21.5.1"],"introduced":["0"],"last_affected":[],"package":"@udecode/plate-core","purl":"pkg:npm/%40udecode/plate-core","source":"GHSA-73rg-f94j-xvhx"},{"ecosystem":"npm","fixed":["36.5.9"],"introduced":["22.0.0"],"last_affected":[],"package":"@udecode/plate-core","purl":null,"source":"GHSA-73rg-f94j-xvhx"},{"ecosystem":"npm","fixed":["36.5.9"],"introduced":["22.0.0"],"last_affected":[],"package":"@udecode/plate-core","purl":"pkg:npm/%40udecode/plate-core","source":"GHSA-73rg-f94j-xvhx"},{"ecosystem":"npm","fixed":["38.0.6"],"introduced":["37.0.0"],"last_affected":[],"package":"@udecode/plate-core","purl":null,"source":"GHSA-73rg-f94j-xvhx"},{"ecosystem":"npm","fixed":["38.0.6"],"introduced":["37.0.0"],"last_affected":[],"package":"@udecode/plate-core","purl":"pkg:npm/%40udecode/plate-core","source":"GHSA-73rg-f94j-xvhx"}],"prev":{"headline":"Unauthorized Access After Organization or Project Deactivation in Zitadel","id":"CVE-2024-47060"},"products":["plate"],"published":"2024-09-20","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":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-09-20","vendors":["udecode"]},"summary":"Attackers can inject malicious DOM attributes into Plate.js editors, leading to cross-site scripting and potential information disclosure of user IP addresses.","url":"https://insights.sbomify.com/CVE-2024-47061/"}