{"id":"CVE-2021-43785","aliases":["CVE-2021-43785","GHSA-f34m-x9pj-62vq"],"related":[],"kind":"vulnerability","state":"published","title":"Cross Site Scripting Vulnerability in @joeattardi/emoji-button","summary":"@joeattardi/emoji-button is a Vanilla JavaScript emoji picker component. In affected versions there are two vectors for XSS attacks: a URL for a custom emoji, and an i18n string. In both of these cases, a value can be crafted such that it can insert a `script` tag into the page and execute malicious code.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"@joeattardi/emoji-button is a Vanilla JavaScript emoji picker component. In affected versions there are two vectors for XSS attacks: a URL for a custom emoji, and an i18n string. In both of these cases, a value can be crafted such that it can insert a `script` tag into the page and execute malicious code.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThere are two vectors for XSS attacks with versions of @joeattardi/emoji-button before 4.6.2:\n\n- A URL for a custom emoji\n- An i18n string\n\nIn both of these cases, a value can be crafted such that it can insert a `script` tag into the page and execute malicious code.\n\n### Patches\n\nThis vulnerability is fixed starting in version 4.6.2. This is resolved by properly escaping strings that are inserted into the HTML document.\n\n### Workarounds\n\nThere is no workaround other than upgrading to a non-vulnerable version.\n\n### Credit\n\nThis issue was discovered by GitHub team member [@erik-krogh (Erik Krogh Kristensen)](https://github.com/erik-krogh) and was reported by the GitHub Security Lab team.","format":"markdown","source":"ghsa"},{"lang":"es","text":"joeattardi/emoji-button es un componente de selección de emoji de Vanilla JavaScript. En las versiones afectadas se presentan dos vectores para ataques de tipo XSS: una URL para un emoji personalizado, y una cadena i18n. En ambos casos, un valor puede ser diseñado de tal manera que puede insertar una etiqueta \"script\" en la página y ejecutar código malicioso","source":"nvd"}],"published":"2021-11-26T18:20:11.000Z","modified":"2026-07-08T06:27:44.662Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","score":7.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","score":7.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","score":7.6,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 4.6.2","status":"affected"}],"vendor":"joeattardi","product":"emoji-button","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.6.2"}],"ecosystem":"npm","package":"@joeattardi/emoji-button","purl":"pkg:npm/%40joeattardi/emoji-button","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.6.2"}],"vendor":"emoji_button_project","product":"emoji_button","cpe":"cpe:2.3:a:emoji_button_project:emoji_button:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/joeattardi/emoji-button/security/advisories/GHSA-f34m-x9pj-62vq","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/joeattardi/emoji-button/commit/05970c09180cd27fff493e998ac5bf0468b1bb16","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/joeattardi/emoji-button/commit/fe54bef107eb3f74873a4018f2ff49fa124c6a2e","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43785","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/joeattardi/emoji-button","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-43785","url":"https://www.cve.org/CVERecord?id=CVE-2021-43785","licence":"CVE Terms of Use","modified":"2024-08-04T04:03:08.932Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f34m-x9pj-62vq","url":"https://github.com/advisories/GHSA-f34m-x9pj-62vq","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:44.662Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-43785","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43785","licence":"Public domain","modified":"2026-06-17T04:11:26.113Z"}],"updatedAt":"2026-11-25T22:24:36.108Z","epss":{"score":0.01047,"percentile":0.6358,"date":"2026-11-30T12:00:22.000Z"}}