Vulnerabilities in pkg:npm/@joeattardi/emoji-button
PACKAGECVE-2021-43785 is a HIGH (CVSS 7.6) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @joeattardi/emoji button libraries in the npm ecosystem. The issue involves cross-site scripting vulnerability in @joeattardi/emoji-button. Remediation is available by upgrading affected packages to version 4.6.2.
pkg:npm/@joeattardi/emoji-button
Vulnerability advisories affecting package pkg:npm/@joeattardi/emoji-button. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-f34m-x9pj-62vq | CVE-2021-43785 | HIGH | Cross-Site Scripting Vulnerability in @joeattardi/emoji-button |
CVE-2021-43785 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L).
How to Fix CVE-2021-43785
To remediate this vulnerability, upgrade all affected @joeattardi/emoji button dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @joeattardi/emoji-button@4.6.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @joeattardi/emoji-button
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-43785, inspect your project dependencies using npm:
npm ls @joeattardi/emoji-button
Analyze the terminal output to locate any version of @joeattardi/emoji button in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.2), your application is affected.
Note: The npm ls @joeattardi/emoji-button command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In @joeattardi/emoji button, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-43785 Affected @joeattardi/emoji button Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@joeattardi/emoji-button
|
npm |
< 4.6.2
|
4.6.2
|
References
Frequently Asked Questions
What is CVE-2021-43785?
Which @joeattardi/emoji button versions are affected?
What version fixes CVE-2021-43785?
Is @joeattardi/emoji-button affected?
What is the CVSS score of CVE-2021-43785?
What CWE is associated with CVE-2021-43785?
How can I check npm dependencies for CVE-2021-43785?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f34m-x9pj-62vq",
"modified" : "2021-12-01T14:34:05Z",
"published" : "2021-12-01T18:29:02Z",
"aliases" : [ "CVE-2021-43785" ],
"summary" : "Cross-Site Scripting Vulnerability in @joeattardi/emoji-button",
"details" : "### Impact\n\nThere are two vectors for XSS attacks with versions of @joeattardi/emoji-button before 4.6.2:\n\n- A URL for a custom emoji\n- An i18n string\n\nIn both of these cases, a value can be crafted such that it can insert a `script` tag into the page and execute malicious code.\n\n### Patches\n\nThis vulnerability is fixed starting in version 4.6.2. This is resolved by properly escaping strings that are inserted into the HTML document.\n\n### Workarounds\n\nThere is no workaround other than upgrading to a non-vulnerable version.\n\n### Credit\n\nThis issue was discovered by GitHub team member [@erik-krogh (Erik Krogh Kristensen)](https://github.com/erik-krogh) and was reported by the GitHub Security Lab team.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@joeattardi/emoji-button"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.6.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/joeattardi/emoji-button/security/advisories/GHSA-f34m-x9pj-62vq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43785"
}, {
"type" : "WEB",
"url" : "https://github.com/joeattardi/emoji-button/commit/05970c09180cd27fff493e998ac5bf0468b1bb16"
}, {
"type" : "WEB",
"url" : "https://github.com/joeattardi/emoji-button/commit/fe54bef107eb3f74873a4018f2ff49fa124c6a2e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/joeattardi/emoji-button"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-29T20:21:36Z",
"nvd_published_at" : "2021-11-26T19:15:00Z"
}
}