CVE-2021-43785: Cross-Site Scripting Vulnerability in @joeattardi/emoji-button
Summary
CVE-2021-43785: Cross-Site Scripting Vulnerability in @joeattardi/emoji-button. Affects @joeattardi/emoji-button versions < 4.6.2. Fixed in 4.6.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @joeattardi/emoji-button package is an npm package that provides a library for adding emoji pickers to web applications. It allows users to easily select and insert emojis into text fields or other input elements. The package is commonly used in web development projects to enhance user experience and provide emoji functionality. However, versions of @joeattardi/emoji-button prior to 4.6.2 are vulnerable to a cross-site scripting (XSS) attack.
Vulnerability Detail
The vulnerability in @joeattardi/emoji-button versions before 4.6.2 allows for XSS attacks through two vectors: a URL for a custom emoji and an i18n string. An attacker can craft a malicious value that can insert a <script> tag into the page and execute arbitrary code. This can lead to various security risks, including unauthorized access, data theft, and manipulation of user interactions. The vulnerability is assigned a CVSS score of 7.6, indicating a high severity level.
How To Fix
Minimum fixed version
4.6.2
This is the first release that contains the fix.
npm install @joeattardi/emoji-button@4.6.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The @joeattardi/emoji-button package versions prior to 4.6.2 are vulnerable to a cross-site scripting (XSS) attack. It is crucial for developers to upgrade to the latest non-vulnerable version (4.6.2 or later) to ensure the security of their applications. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for @joeattardi/emoji-button →
FAQ
The vulnerability allows for cross-site scripting attacks, which can lead to unauthorized access, data theft, and manipulation of user interactions.
To mitigate the risk, it is recommended to upgrade to version 4.6.2 or later of the @joeattardi/emoji-button package.
There are no known workarounds other than upgrading to a non-vulnerable version.
This vulnerability was discovered by GitHub team member Erik Krogh Kristensen and reported by the GitHub Security Lab team.
You can find more information about this vulnerability in the GitHub Security Advisory GHSA-f34m-x9pj-62vq.