Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

225
Vistas
Vulnerability with node EJS package?

I would like to know if it is safe to use EJS in a Node Express web server, to let users create customizable content, that would be then rendered server side by EJS (https://www.npmjs.com/package/ejs).

For instance, a user could create a template where he would specify {%= product.category %} in a product description webpage.

But then, he could specify {%= process.exit(0) %} which would cause the web server to exit! He could also get access to the server file system, I guess.

One way to add some security would be to specify { process: null } in the context parameter of the render method, but I imagine there are many other dangerous entries?

So is it safe to do this? Are there some workarounds (maybe some EJS options, but I did not see them)? Or some alternative packages?

Edit: I have found the following issue on the package repository: https://github.com/mde/ejs/issues/632 which recommends not using EJS for such a use case.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda