Description
The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in settings[view options][outputFunctionName]. This is parsed as an internal option, and overwrites the outputFunctionName option with an arbitrary OS command (which is executed upon template compilation).
Remediation
References
https://eslam.io/posts/ejs-server-side-template-injection-rce/
https://github.com/mde/ejs/releases
https://security.netapp.com/advisory/ntap-20220804-0001/
Related Vulnerabilities
CVE-2021-41532 Vulnerability in maven package org.apache.ozone:ozone-recon
CVE-2021-23337 Vulnerability in maven package org.webjars:lodash
CVE-2022-41254 Vulnerability in maven package org.jenkins-ci.plugins:cons3rt
CVE-2023-43498 Vulnerability in maven package org.jenkins-ci.main:jenkins-core
CVE-2020-36048 Vulnerability in maven package org.webjars.bower:engine.io