{"id":"CVE-2021-43785","aliases":["EUVD-2021-2506","GHSA-f34m-x9pj-62vq"],"status":"published","title":"Cross Site Scripting Vulnerability in @joeattardi/emoji-button","description":"@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.","severity":{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.01047,"percentile":0.64635,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2021-11-26T18:20:11Z","modified":"2026-10-20T10:55:03Z","fixes":[{"ecosystem":"npm","package":"@joeattardi/emoji-button","fixed_in":["4.6.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@joeattardi/emoji-button","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.2"}]}]},{"source":"osv","ecosystem":"npm","package":"@joeattardi/emoji-button","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.6.2"}]}]}],"products":[{"vendor":"emoji_button_project","product":"emoji_button"},{"vendor":"joeattardi","product":"emoji-button"}],"references":[{"url":"https://github.com/joeattardi/emoji-button/security/advisories/GHSA-f34m-x9pj-62vq","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/joeattardi/emoji-button/commit/05970c09180cd27fff493e998ac5bf0468b1bb16","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/joeattardi/emoji-button/commit/fe54bef107eb3f74873a4018f2ff49fa124c6a2e","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43785","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-f34m-x9pj-62vq"},{"url":"https://github.com/joeattardi/emoji-button","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-43785","title":"Cross Site Scripting Vulnerability in @joeattardi/emoji-button","description":"@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.","status":"published","published":"2021-11-26T18:20:11Z","modified":"2024-08-04T04:03:08.932Z","cvss":[{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:32:57.033395Z"}],"euvd":[{"id":"EUVD-2021-2506","description":"@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.","status":"published","published":"2021-11-26T18:20:11Z","modified":"2024-08-04T04:03:08Z","cvss":[{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","level":"high"}],"updated_at":"2026-11-03T03:24:13.772922Z"}],"ghsa":[{"id":"GHSA-f34m-x9pj-62vq","title":"Cross-Site Scripting Vulnerability in @joeattardi/emoji-button","description":"### 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.","status":"published","published":"2021-12-01T18:29:02Z","modified":"2023-02-01T05:06:30Z","cvss":[{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:39.086869Z"}],"nvd":[{"id":"CVE-2021-43785","description":"@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.","status":"published","published":"2021-11-26T19:15:08.077Z","modified":"2026-06-17T04:11:26.113Z","cvss":[{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","level":"high","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:07:01.428028Z"}],"osv":[{"id":"CVE-2021-43785","description":"@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.","status":"published","published":"2021-11-26T19:15:08.077Z","modified":"2026-10-20T10:55:03.529099552Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:21.877444Z"},{"id":"GHSA-f34m-x9pj-62vq","title":"Cross-Site Scripting Vulnerability in @joeattardi/emoji-button","description":"### 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.","status":"published","published":"2021-12-01T18:29:02Z","modified":"2026-07-08T06:27:44.662091967Z","cvss":[{"version":"3.1","score":7.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:45.639885Z"}]}}
