Critical Vulnerability in node-ejs: Lack of Pollution Protection

node-ejs Updated 02 Oct 2025

Summary

28/04/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-33883: The ejs (aka Embedded JavaScript templates) package before 3.1.10 for Node.js lacks certain pollution protection. Affects node-ejs versions < 3.1.10+~3.1.5-1. Fixed in 3.1.10+~3.1.5-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The node-ejs package, also known as Embedded JavaScript templates, is a popular templating engine for Node.js applications. It allows developers to generate HTML markup with plain JavaScript, providing a simple and efficient way to create dynamic web pages. However, prior to version 3.1.10, the package is vulnerable to certain pollution attacks, which can compromise the integrity of the templates and lead to potential security issues.

Vulnerability Detail

The vulnerability in node-ejs arises from a lack of adequate pollution protection in versions before 3.1.10. This flaw allows attackers to manipulate the template rendering process, potentially injecting malicious code or altering the expected output. The ramifications of this vulnerability can include unauthorized access to sensitive data, execution of arbitrary code, and overall compromise of the application’s security.

How To Fix

Minimum fixed version

3.1.10+~3.1.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-ejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, developers can implement input validation and sanitization measures within their applications to mitigate the risk of pollution attacks. This includes ensuring that user inputs are properly escaped and validated before being processed by the templating engine.

Conclusion

The node-ejs package has a critical vulnerability that can lead to severe security risks if not addressed. It is crucial for developers to update to the patched version and implement necessary security measures to protect their applications.

See every vulnerability recorded for node-ejs →

Share this vulnerability

FAQ

Node-ejs is a templating engine for Node.js that allows developers to create dynamic HTML pages using JavaScript.

The vulnerability allows for pollution attacks that can compromise the integrity of templates and lead to security issues.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Consequences may include unauthorized access to sensitive data, execution of arbitrary code, and overall compromise of application security.

You can update the package by running the command 'sudo apt-get install node-ejs=3.1.10+~3.1.5-1' in your terminal.

Related vulnerabilities

Recent vulnerabilities recorded for node-ejs.

How To Fix

Minimum fixed version

3.1.10+~3.1.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-ejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback