# CVE-2021-43785: Cross Site Scripting Vulnerability in @joeattardi/emoji-button

- Severity: High 7.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.05%, higher than 64% of CVEs (2026-11-30)
- Published: 2021-11-26T18:20:11.000Z
- Modified: 2026-07-08T06:27:44.662Z
- Also known as: GHSA-f34m-x9pj-62vq
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- joeattardi emoji-button: < 4.6.2
- @joeattardi/emoji-button (npm): before 4.6.2
- emoji_button_project emoji_button: before 4.6.2

## Every score

- GitHub_M: CVSS:3.1 7.6 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L`
- GitHub: CVSS:3.1 7.6 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/joeattardi/emoji-button/security/advisories/GHSA-f34m-x9pj-62vq> (third-party-advisory, web)
- <https://github.com/joeattardi/emoji-button/commit/05970c09180cd27fff493e998ac5bf0468b1bb16> (patch, third-party-advisory, web)
- <https://github.com/joeattardi/emoji-button/commit/fe54bef107eb3f74873a4018f2ff49fa124c6a2e> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-43785> (advisory)
- <https://github.com/joeattardi/emoji-button> (package)

## Sources

- CVE List: [CVE-2021-43785](https://www.cve.org/CVERecord?id=CVE-2021-43785), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-f34m-x9pj-62vq](https://github.com/advisories/GHSA-f34m-x9pj-62vq), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-43785](https://nvd.nist.gov/vuln/detail/CVE-2021-43785), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-43785 · Whole record: https://cve.day/CVE-2021-43785.json · Rebuilt by cve.day 2026-11-25T22:24:36.108Z
