{"answers":{"affected":"2 open source packages ship an affected version, including tinymce.","exploited":"There is no known exploitation of GHSA-5vm8-hhgr-jcjp in the wild and no public exploit code.","fix":"Upgrade tinymce to 5.7.1 or later.","what":"GHSA-5vm8-hhgr-jcjp is a cross-site scripting vulnerability in tinymce, published on 28 May 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-5vm8-hhgr-jcjp and fix it if it is affected.\n\nWhat it is: GHSA-5vm8-hhgr-jcjp is a cross-site scripting vulnerability in tinymce, published on 28 May 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-5vm8-hhgr-jcjp in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tinymce (npm): affected all versions; fixed in 5.7.1\n- tinymce (npm): affected all versions; fixed in 5.7.1\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/GHSA-5vm8-hhgr-jcjp/ (Markdown: https://insights.sbomify.com/GHSA-5vm8-hhgr-jcjp/index.md)","id":"GHSA-5vm8-hhgr-jcjp","markdown":"https://insights.sbomify.com/GHSA-5vm8-hhgr-jcjp/index.md","name":"GHSA-5vm8-hhgr-jcjp","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript rich text editor","requires_auth":"low_privilege","summary":"An XSS vulnerability in TinyMCE allows arbitrary JavaScript execution via crafted form URLs when content is previewed or rendered outside the editor.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\nA cross-site scripting (XSS) vulnerability was discovered in the URL sanitization logic of the core parser for `form` elements. The vulnerability allowed arbitrary JavaScript execution when inserting a specially crafted piece of content into the editor using the clipboard or APIs, and then submitting the form. However, as TinyMCE does not allow forms to be submitted while editing, the vulnerability could only be triggered when the content was previewed or rendered outside of the editor. This impacts all users who are using TinyMCE 5.7.0 or lower.\n\n### Patches\nThis vulnerability has been patched in TinyMCE 5.7.1 by improved URL sanitization logic.\n\n### Workarounds\nTo work around this vulnerability, either:\n- Upgrade to TinyMCE 5.7.1 or higher\n- Manually sanitize `form` URL attributes using a [TinyMCE node filter](https://www.tiny.cloud/docs/api/tinymce.html/tinymce.html.domparser/#addnodefilter).\n- Disable `form` elements in your content using the [invalid_elements](https://www.tiny.cloud/docs/configure/content-filtering/#invalid_elements) setting.\n\n#### Example: Sanitizing using a node filter\n```js\neditor.parser.addNodeFilter('form', function(nodes) {\n  nodes.forEach(function(node) {\n    if (node.attributes) {\n      node.attributes.forEach(function(attr) {\n        var name = attr.name;\n        var value = attr.value;\n        // Sanitize the attribute value here or remove it entirely\n        var sanitizedValue = ...;\n        node.attr(name, santizedValue);\n      });\n    }\n  });\n});\n```\n\n#### Example: Using invalid_elements\n```js\ninvalid_elements: 'form'\n```\n\n### Acknowledgements\nTiny Technologies would like to thank Mikhail Khramenkov at Solar Security Research Team for discovering this vulnerability.\n\n### References\nhttps://www.tiny.cloud/docs/release-notes/release-notes571/#securityfixes\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in the [TinyMCE repo](https://github.com/tinymce/tinymce/issues)\n* Email us at [infosec@tiny.cloud](mailto:infosec@tiny.cloud)","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Cross-site scripting vulnerability in TinyMCE","id":"GHSA-5vm8-hhgr-jcjp","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"tinymce","purl":null,"source":"GHSA-5vm8-hhgr-jcjp"},{"ecosystem":"npm","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"tinymce","purl":"pkg:npm/tinymce","source":"GHSA-5vm8-hhgr-jcjp"}],"products":null,"published":"2021-05-28","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An XSS vulnerability in TinyMCE allows arbitrary JavaScript execution via crafted form URLs when content is previewed or rendered outside the editor.","url":"https://insights.sbomify.com/GHSA-5vm8-hhgr-jcjp/"}