Description Preview
Overview
MJML (Mailjet Markup Language) is a markup language designed to simplify the creation of responsive email templates. The vulnerability exists in the mj-include component, which allows users to include external MJML files within their templates. In versions 4.6.2 and earlier, the path parameter of the mj-include directive is not properly validated, allowing attackers to use directory traversal sequences (such as "../") to access files outside the intended directory. This could lead to unauthorized access to sensitive files on the server where MJML is being processed, potentially exposing configuration files, credentials, or other confidential information.
Remediation
To remediate this vulnerability, users should:
- Update to MJML version 4.6.3 or later, which contains the fix for this vulnerability.
- If immediate updating is not possible, implement additional validation for file paths in your application layer before passing them to MJML.
- Consider implementing a whitelist approach for includable files or restricting the directories that can be accessed by the MJML processor.
- Run MJML with minimal privileges and in a sandboxed environment when processing untrusted input.
- Monitor for suspicious activity that might indicate exploitation attempts of this vulnerability.
The fix implemented in version 4.6.3 prevents directory traversal by properly validating and sanitizing file paths before accessing files.
References
- MJML 4.6.3 Release Notes: https://github.com/mjmlio/mjml/releases/tag/v4.6.3
- Patch Commit: https://github.com/mjmlio/mjml/commit/30e29ed2cdaec8684d60a6d12ea07b611c765a12
- Exploit Details: http://packetstormsecurity.com/files/158111/MJML-4.6.2-Path-Traversal.html
- Full Disclosure Mailing List: http://seclists.org/fulldisclosure/2020/Jun/23
- MJML Community Page: https://mjml.io/community
- MJML Twitter Account: https://twitter.com/mjmlio
Industry ExposureMost to leastThis section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
- Accommodation & Food ServicesAccommodation & Food Services: Low
- Administrative, Support, Waste Management & Remediation ServicesAdministrative, Support, Waste Management & Remediation Services: Low
- Agriculture, Forestry Fishing & HuntingAgriculture, Forestry Fishing & Hunting: Low
- Arts, Entertainment & RecreationArts, Entertainment & Recreation: Low
- ConstructionConstruction: Low
- Educational ServicesEducational Services: Low
- Finance and InsuranceFinance and Insurance: Low
- Health Care & Social AssistanceHealth Care & Social Assistance: Low
- InformationInformation: Low
- Management of Companies & EnterprisesManagement of Companies & Enterprises: Low
- ManufacturingManufacturing: Low
- MiningMining: Low
- Other Services (except Public Administration)Other Services (except Public Administration): Low
- Professional, Scientific, & Technical ServicesProfessional, Scientific, & Technical Services: Low
- Public AdministrationPublic Administration: Low
- Real Estate Rental & LeasingReal Estate Rental & Leasing: Low
- Retail TradeRetail Trade: Low
- Transportation & WarehousingTransportation & Warehousing: Low
- UtilitiesUtilities: Low
- Wholesale TradeWholesale Trade: Low

