-
Notifications
You must be signed in to change notification settings - Fork 982
Description
Hi!
Past vulnerability CVE-2020-12827 has come to my attention. After reading the detailed description and inspecting the two related commits…
…between releases 4.6.2 and 4.6.3, my impression so far is that the issue of attacker-controlled file access has not been fixed and that the default settings are still vulnerable.
For proof (1), in version <mj-include path="/etc/passwd" /> renders an error while <mj-include path="no_such_file" /> renders a comment <!-- mj-include fails to read file [..] --> and overall rendering succeeds, so checking for the existence of files still works (provided some error feedback channel to the attacker).
What's worse (2), when adding type="css" as documented at https://documentation.mjml.io/#mj-include a la …
<mjml>
<mj-body>
<mj-include path="/etc/passwd" type="css" />
</mj-body>
</mjml>…and compiling via mjml -r demo.mjml the whole file content is included verbatim into the HTML header, and no error is produced.
So from my point of view CVE-2020-12827 is wide open by default and has never been fixed. Could you clarify and point me to what I am missing?
Thanks and best, Sebastian
CC @hannob