CVE-2025-67898
Unknown Unknown - Not Provided
Directory Traversal in MJML ≀4.18.0 Allows File Read Access

Publication date: 2025-12-14

Last updated on: 2025-12-14

Assigner: MITRE

Description
MJML through 4.18.0 allows mj-include directory traversal to test file existence and (in the type="css" case) read files. NOTE: this issue exists because of an incomplete fix for CVE-2020-12827.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-12-14
Last Modified
2025-12-14
Generated
2026-05-07
AI Q&A
2025-12-15
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
mjml mjml 4.18.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-36 The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability in MJML through version 4.18.0 allows an attacker to perform directory traversal via the mj-include feature. This can be used to test for the existence of files and, in cases where the type is "css", to read the contents of files. The issue stems from an incomplete fix for a previous vulnerability (CVE-2020-12827).


How can this vulnerability be detected on my network or system? Can you suggest some commands?

You can detect this vulnerability by attempting to include files using the mj-include tag in MJML files and observing the output. For example, create an MJML file with the line `<mj-include path="/etc/passwd" />` and compile it using the command `mjml -r demo.mjml`. If the system returns an error or includes the file content (especially when using `type="css"`), it indicates the vulnerability is present. Similarly, testing with a non-existent file like `<mj-include path="no_such_file" />` should produce a comment indicating failure but still render successfully, which also signals the vulnerability. Using `mjml -r demo.mjml` to compile and observe the output is key to detection. [1]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include configuring the MJML framework to set the `ignoreIncludes` setting to `true` to prevent processing of `<mj-include>` tags that could lead to directory traversal and file inclusion. Additionally, avoid using MJML versions prior to the fix and monitor for updates or patches that address this vulnerability. Restrict file system permissions to limit access to sensitive files from the MJML process. Until an official fix is released, disabling or restricting the use of `<mj-include>` tags, especially with the `type="css"` attribute, can reduce risk. [1]


How can this vulnerability impact me? :

The vulnerability can allow an attacker with local access to the system to discover the presence of files and potentially read sensitive files when using the mj-include feature with type="css". This could lead to information disclosure and partial compromise of confidentiality, as indicated by the CVSS score showing low confidentiality impact and low availability impact.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart