CVE-2021-41236:
XSS vulnerability on email template preview page
6.9
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.6494%
CWE
Published
1/6/2022
Updated
2/3/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
oro/platform | composer | >= 3.1.0, < 3.1.21 | 3.1.21 |
oro/platform | composer | >= 4.1.0, < 4.1.14 | 4.1.14 |
oro/platform | composer | >= 4.2.0, < 4.2.8 | 4.2.8 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the compilePreview
method rendering user-controlled email template content without proper sanitization. The commit diff shows the fix introduced HTML sanitization via HtmlTagHelper::sanitize()
in this method. The original implementation passed $template->getContent()
directly to Twig's createTemplate
, which - despite using {% verbatim %}
- didn't neutralize existing script tags in the content. The addition of sanitization in the patched version confirms the vulnerability existed in this function.