Every CVESearch/Get API key

CVE-2021-43785

Cross Site Scripting Vulnerability in @joeattardi/emoji-button

7.6 HighFix available

@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

1.05%Up 0.2 points since Nov 27, 2021
90%50%10%1%

What each source reports

CVE List Score used7.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 HighCVSS: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-25067.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 HighCVSS: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-62vq7.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 HighCVSS: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
NVD7.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 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:P/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV6.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 MediumCVSS: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-62vq7.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 HighCVSS: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

Affected packages
PackageAffectedFixed
@joeattardi/emoji-button
npm
before 4.6.2
4.6.2

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE 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

MoveEnter Open