CVE-2020-7741 Cross-site Scripting (XSS)
An attacker can execute arbitrary JavaScript in the victim's browser by injecting payloads into the oauth_redirect URL parameter.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-7741?
CVE-2020-7741 is a critical cross-site scripting vulnerability in hellojs, published on 6 Oct 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
This affects the package hellojs before 1.18.6. The code get the param oauth_redirect from url and pass it to location.assign without any check and sanitisation. So we can simply pass some XSS payloads into the url param oauth_redirect, such as javascript:alert(1).
Weakness: CWE-79
Which versions are affected by CVE-2020-7741?
2 open source packages ship an affected version, including hellojs. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
hellojs npm | All versions | 1.18.6 |
hellojs npm | All versions | 1.18.6 |
Products include Hello.js Project Hello.js.
How do I fix CVE-2020-7741?
Upgrade hellojs to 1.18.6 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2020-7741 being exploited?
There is no known exploitation of CVE-2020-7741 in the wild and no public exploit code.
Other vulnerabilities in hellojs
Sources
Also known as GHSA-7jh9-6cpf-h4m7, SNYK-JS-HELLOJS-1014546.