CVE-2020-15178: Potential XSS injection In PrestaShop contactform
8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.6802%
CWE
Published
9/15/2020
Updated
1/12/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
prestashop/contactform | composer | >= 1.0.1, < 4.3.0 | 4.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key issues:
- In getWidgetVariables, html_entity_decode() was applied to user-controlled message input, reversing any existing HTML escaping and enabling script injection in the form's UI.
- In sendMessage, the message was only processed with stripslashes() before email template insertion, leaving HTML special characters unencoded. The patch added Tools::htmlentitiesUTF8() to properly sanitize output. Both functions directly handle user-supplied message input without adequate output encoding in vulnerable versions, making them the attack vectors for stored XSS.