CVE-2024-21628 XSS can be stored in DB from "add a message form" in order detail page (FO)

Medium 5.4 Published Updated

Attackers can store XSS payloads in the database via the order detail message form, affecting customers viewing the page in the frontend.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-21628?

CVE-2024-21628 is a medium-severity cross-site scripting vulnerability in Prestashop Prestashop, published on 2 Jan 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

PrestaShop is an open-source e-commerce platform. Prior to version 8.1.3, the isCleanHtml method is not used on this this form, which makes it possible to store a cross-site scripting payload in the database. The impact is low because the HTML is not interpreted in BO, thanks to twig's escape mechanism. In FO, the cross-site scripting attack is effective, but only impacts the customer sending it, or the customer session from which it was sent. This issue affects those who have a module fetching these messages from the DB and displaying it without escaping HTML. Version 8.1.3 contains a patch for this issue.

Weakness: CWE-79

Which versions are affected by CVE-2024-21628?

2 open source packages ship an affected version, including prestashop/prestashop. It affects 1 product.

PackageAffectedFixed in
prestashop/prestashop PackagistAll versions8.1.3
prestashop/prestashop PackagistAll versions8.1.3

Products include Prestashop Prestashop.

How do I fix CVE-2024-21628?

Upgrade prestashop/prestashop to 8.1.3 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-2024-21628 being exploited?

There is no known exploitation of CVE-2024-21628 in the wild and no public exploit code.

All Prestashop Prestashop vulnerabilities

Sources

Also known as GHSA-vr7m-r9vm-m4wf.

Is CVE-2024-21628 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free