CVE-2021-21418
PHP vulnerability analysis and mitigation

Overview

CVE-2021-21418 is a vulnerability in the psemailsubscription module, a newsletter subscription module for the PrestaShop platform. The vulnerability was discovered and disclosed in March 2021, affecting versions prior to 2.6.1. The issue allows an employee to inject JavaScript code in the newsletter condition field that would then be executed on the front office ([GitHub Advisory](https://github.com/PrestaShop/psemailsubscription/security/advisories/GHSA-vwfx-hh3w-fj99)).

Technical details

The vulnerability is classified as a stored Cross-Site Scripting (XSS) vulnerability (CWE-79) with a moderate severity rating. The issue stems from improper sanitization of user input in the newsletter condition field, which allows for JavaScript injection that gets stored and later executed when viewed on the front office (GitHub Advisory).

Impact

When successfully exploited, this vulnerability allows malicious JavaScript code injected by an employee to be executed in the context of users visiting the front office of the PrestaShop installation. This could potentially lead to theft of user data, session hijacking, or other client-side attacks (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in version 2.6.1 of the psemailsubscription module. The fix involves properly escaping the newsletter condition field content using Tools::htmlentitiesUTF8() before displaying it on the front office. Users are advised to upgrade to version 2.6.1 or later to address this security issue (GitHub Release, [GitHub Commit](https://github.com/PrestaShop/psemailsubscription/commit/664ffb225e2afb4a32640bbedad667dc6e660b70)).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-13828CRITICAL9
  • PHPPHP
  • mautic/core
NoYesDec 02, 2025
CVE-2025-13827HIGH8.8
  • PHPPHP
  • mautic/grapes-js-builder-bundle
NoYesDec 02, 2025
CVE-2025-66312MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025
CVE-2025-66311MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025
CVE-2025-66310MEDIUM6.2
  • PHPPHP
  • getgrav/grav
NoYesDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management