CVE-2020-15178 Potential XSS in PrestaShop contactform
Attackers can inject JavaScript via the contact form message field, potentially executing arbitrary code in victim browsers.
- 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-2020-15178?
CVE-2020-15178 is a high-severity cross-site scripting vulnerability in PrestaShop contactform, published on 15 Sep 2020. 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
In PrestaShop contactform module (prestashop/contactform) before version 4.3.0, an attacker is able to inject JavaScript while using the contact form. The `message` field was incorrectly unescaped, possibly allowing attackers to execute arbitrary JavaScript in a victim's browser.
Weakness: CWE-79
Which versions are affected by CVE-2020-15178?
2 open source packages ship an affected version, including prestashop/contactform. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
prestashop/contactform Packagist | From 1.0.1 | 4.3.0 |
prestashop/contactform Packagist | From 1.0.1 | 4.3.0 |
Products include Prestashop Contactform.
How do I fix CVE-2020-15178?
Upgrade prestashop/contactform to 4.3.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-2020-15178 being exploited?
There is no known exploitation of CVE-2020-15178 in the wild and no public exploit code.
Sources
Also known as CVE-2023-31508, GHSA-95hx-62rh-gg96.