CVE-2021-43785
Cross Site Scripting Vulnerability in @joeattardi/emoji-button
@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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used 7.6
Cross Site Scripting Vulnerability in @joeattardi/emoji-button
@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.
- Record
CVE-2021-43785- 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2021-2506 7.6
@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.
- Record
EUVD-2021-2506- 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 - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f34m-x9pj-62vq 7.6
Cross-Site Scripting Vulnerability in @joeattardi/emoji-button
Impact
There are two vectors for XSS attacks with versions of @joeattardi/emoji-button before 4.6.2:
- A URL for a custom emoji
- 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.
Patches
This vulnerability is fixed starting in version 4.6.2. This is resolved by properly escaping strings that are inserted into the HTML document.
Workarounds
There is no workaround other than upgrading to a non-vulnerable version.
Credit
This issue was discovered by GitHub team member @erik-krogh (Erik Krogh Kristensen) and was reported by the GitHub Security Lab team.
- Record
GHSA-f34m-x9pj-62vq- 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD 7.6
@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.
- Record
CVE-2021-43785- 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 - 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 - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV 6.1
@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.
- Record
CVE-2021-43785- 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 - Updated
- 2026-11-02
OSVGHSA-f34m-x9pj-62vq 7.6
Cross-Site Scripting Vulnerability in @joeattardi/emoji-button
Impact
There are two vectors for XSS attacks with versions of @joeattardi/emoji-button before 4.6.2:
- A URL for a custom emoji
- 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.
Patches
This vulnerability is fixed starting in version 4.6.2. This is resolved by properly escaping strings that are inserted into the HTML document.
Workarounds
There is no workaround other than upgrading to a non-vulnerable version.
Credit
This issue was discovered by GitHub team member @erik-krogh (Erik Krogh Kristensen) and was reported by the GitHub Security Lab team.
- Record
GHSA-f34m-x9pj-62vq- 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@joeattardi/emoji-buttonnpm | before 4.6.2 | 4.6.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-43785 is a high vulnerability (CVSS 7.6) in Emoji Button Project Button, published November 26, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.05%, the 64th percentile. Fixed in @joeattardi/emoji-button 4.6.2.
References
github.com/joeattardi/emoji-button/security/advisories/GHSA-f34m-x9pj-62vq
github.com/joeattardi/emoji-button/commit/05970c09180cd27fff493e998ac5bf0468b1bb16
github.com/joeattardi/emoji-button/commit/fe54bef107eb3f74873a4018f2ff49fa124c6a2e
nvd.nist.gov/vuln/detail/CVE-2021-43785
github.com/advisories/GHSA-f34m-x9pj-62vq
github.com/joeattardi/emoji-button