Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Terser to Resolve ReDoS Vulnerability #2722

Closed
Raxvis opened this issue Aug 8, 2023 · 7 comments
Closed

Update to Terser to Resolve ReDoS Vulnerability #2722

Raxvis opened this issue Aug 8, 2023 · 7 comments

Comments

@Raxvis
Copy link

Raxvis commented Aug 8, 2023

The html-minifier package hasn't been updated for nearly 4 years and has a kangax/html-minifier#1135. Terser has forked the repo and is actively maintaining it under html-minifier-terser.

Can mjml get updated to use the maintained package from Terser?

@iRyusa
Copy link
Member

iRyusa commented Aug 8, 2023 via email

@Raxvis
Copy link
Author

Raxvis commented Aug 8, 2023

We have templates running on the fly as we have mustache inside of html.

Is there any help that you need with removing the minify? Would you take a PR for this?

@iRyusa
Copy link
Member

iRyusa commented Aug 8, 2023 via email

@Raxvis
Copy link
Author

Raxvis commented Aug 8, 2023

We don't minify but the package is getting scanned and that's causing issues since it's in the dependencies.

No worries, I will manually build for now and upgrade later

@Raxvis Raxvis closed this as completed Aug 8, 2023
@tschoffelen
Copy link

tschoffelen commented Oct 5, 2023

This is still making bundling more complicated as well - any progress in marking as optional? I'm happy to put in a PR - any guidance on if you want to do something code wise, or just move it to optionalDeps in package.json?

Edit: I noticed there is already a similar PR for v5. Let me know if I can help with anything!

@iRyusa
Copy link
Member

iRyusa commented Oct 5, 2023

👋 @tschoffelen I think optionalDependencies are checked too by npm audit and other security check.

As we're removing both beautify + minify from the lib, the HTML output from MJML is really bad, i'm looking for a lightweight alternative to beautify-js.
I'm still working on this on my free time and miss the release date that I had in mind for last month 😢

You can find more info in #2589 You can reach me on MJML slack if you want 👍

@tschoffelen
Copy link

Thanks @iRyusa! I was indeed more thinking about the problem I'm having in bundling mjml with esbuild at the moment.

Thanks for the work you've been doing on this so far, and I understand how hard it is to find time to do this soft of stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants