GHSA-f34m-x9pj-62vq

Suggest an improvement
Source
https://github.com/advisories/GHSA-f34m-x9pj-62vq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/12/GHSA-f34m-x9pj-62vq/GHSA-f34m-x9pj-62vq.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-f34m-x9pj-62vq
Aliases
Related
Published
2021-12-01T18:29:02Z
Modified
2023-11-08T04:07:12.000759Z
Severity
  • 7.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L CVSS Calculator
Summary
Cross-Site Scripting Vulnerability in @joeattardi/emoji-button
Details

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.

Database specific
{
    "nvd_published_at": "2021-11-26T19:15:00Z",
    "cwe_ids": [
        "CWE-79"
    ],
    "github_reviewed_at": "2021-11-29T20:21:36Z",
    "severity": "HIGH",
    "github_reviewed": true
}
References

Affected packages

npm / @joeattardi/emoji-button

Package

Name
@joeattardi/emoji-button
View open source insights on deps.dev
Purl
pkg:npm/%40joeattardi/emoji-button

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.6.2

Database specific

source

"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/12/GHSA-f34m-x9pj-62vq/GHSA-f34m-x9pj-62vq.json"