PrestaShop XSS can be stored in DB from "add a message form" in order detail page (FO)

Description

Impact

The isCleanHtml method is not used on this this form, which makes it possible to store an xss in DB.
The impact is low because the html is not interpreted in BO, thanks to twig's escape mechanism.
In FO, the xss is effective, but only impacts the customer sending it, or the customer session from which it was sent.

Be careful if you have a module fetching these messages from the DB and displaying it without escaping html.

Patches

8.1.x

Reporter

Reported by Rona Febriana (linkedin: https://www.linkedin.com/in/rona-febriana/)

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2024-01-03 21:48:56 UTC
Updated
2024-01-03 21:48:57 UTC
GitHub reviewed
2024-01-03 21:48:56 UTC
NVD published
2024-01-02

EPSS Score

Score Percentile
0.38% 59.51%

CVSS Scores

Base score Version Severity Vector
5.4 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.

Identifiers

CWEs

CWE id Name
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Credits

  • matthieu-rolland (remediation_developer)
  • AureRita (remediation_verifier)
  • boherm (remediation_reviewer)
  • matks (remediation_reviewer)
  • nicosomb (remediation_reviewer)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
composer prestashop/prestashop < 8.1.3 8.1.3

References

cvelogic Threat Intelligence