CVE-2024-21627
JSON

8.1high

Some attribute not escaped in Validate::isCleanHTML method

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.52% (higher than 45% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-xgpm-q3mq-46rq

Description

PrestaShop is an open-source e-commerce platform. Prior to versions 8.1.3 and 1.7.8.11, some event attributes are not detected by the `isCleanHTML` method. Some modules using the `isCleanHTML` method could be vulnerable to cross-site scripting. Versions 8.1.3 and 1.7.8.11 contain a patch for this issue. The best workaround is to use the `HTMLPurifier` library to sanitize html input coming from users. The library is already available as a dependency in the PrestaShop project. Beware though that in legacy object models, fields of `HTML` type will call `isCleanHTML`.

Affected

Product or packageVersionsReported by
PrestaShop PrestaShop>= 8.0.0, < 8.1.3, < 1.7.8.11, before 1.7.8.11, from 8.0.0 before 8.1.3CVE List, NVD
prestashop/prestashop (Packagist)from 8.0.0-beta.1 before 8.1.3, before 1.7.8.11GitHub Advisory Database

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-20CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

PrestaShop is an open-source e-commerce platform. Prior to versions 8.1.3 and 1.7.8.11, some event attributes are not detected by the `isCleanHTML` method. Some modules using the `isCleanHTML` method could be vulnerable to cross-site scripting. Versions 8.1.3 and 1.7.8.11 contain a patch for this issue. The best workaround is to use the `HTMLPurifier` library to sanitize html input coming from users. The library is already available as a dependency in the PrestaShop project. Beware though that in legacy object models, fields of `HTML` type will call `isCleanHTML`.

GitHub Advisory Database
Description

Some event attributes are not detected by the isCleanHTML method

Impact

Some modules using the isCleanHTML method could be vulnerable to xss

Patches

8.1.3, 1.7.8.11

Workarounds

The best workaround is to use the HTMLPurifier library to sanitize html input coming from users. The library is already available as a dependency in the PrestaShop project. Beware though that in legacy object models, fields of HTML type will call isCleanHTML.

Reporters

Reported by Antonio Russo (@Antonio-R1 on GitHub) and Antonio Rocco Spataro (@antoniospataro on GitHub).

NVD (es)

PrestaShop es una plataforma de comercio electrónico de código abierto. Antes de las versiones 8.1.3 y 1.7.8.11, el método `isCleanHTML` no detecta algunos atributos de eventos. Algunos módulos que utilizan el método `isCleanHTML` podrían ser vulnerables a cross site scripting. Las versiones 8.1.3 y 1.7.8.11 contienen un parche para este problema. La mejor solución es utilizar la librería `HTMLPurifier` para sanitizar la entrada HTML proveniente de los usuarios. La librería ya está disponible como dependencia en el proyecto PrestaShop. Sin embargo, tenga en cuenta que en los modelos de objetos heredados, los campos de tipo `HTML` llamarán `isCleanHTML`.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21627 changed 2025-06-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-xgpm-q3mq-46rq changed 2026-09-10CC-BY-4.0
NVDCVE-2024-21627 changed 2026-06-17Public domain