CVE-2021-23784 Cross-site Scripting (XSS)
An attacker can inject malicious scripts via unescaped object inputs in the tempura library, potentially compromising user sessions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-23784?
CVE-2021-23784 is a medium-severity cross-site scripting vulnerability in tempura, published on 3 Nov 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
This affects the package tempura before 0.4.0. If the input to the esc function is of type object (i.e an array) it is returned without being escaped/sanitized, leading to a potential Cross-Site Scripting vulnerability.
Weakness: CWE-79
Which versions are affected by CVE-2021-23784?
2 open source packages ship an affected version, including tempura. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
tempura npm | All versions | 0.4.0 |
tempura npm | All versions | 0.4.0 |
Products include Tempura Project Tempura.
How do I fix CVE-2021-23784?
Upgrade tempura to 0.4.0 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-2021-23784 being exploited?
There is no known exploitation of CVE-2021-23784 in the wild and no public exploit code.
Sources
Also known as GHSA-w4v7-hwx7-9929, SNYK-JS-TEMPURA-1569633.