Critical Template Injection Vulnerability in node-dot Package

node-dot Updated 02 Oct 2025

Summary

15/03/2020
N/A
Yes i
High
8.8

CVE-2020-8141: The dot package v1.1.2 uses Function() to compile templates. Affects node-dot across 2 version ranges.

< 1.1.3+ds-1 < 9b4640962f4578404ef05e9ea9f24caf16088f5f

Fixed in 1.1.3+ds-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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The node-dot package is a templating engine for Node.js that allows developers to create dynamic HTML pages by embedding JavaScript code within templates. It is widely used for rendering views in web applications. However, the package is vulnerable to a critical issue that arises from its use of the Function() constructor to compile templates, which can lead to severe security risks if an attacker can manipulate the template or the Object.prototype values.

Vulnerability Detail

The vulnerability, identified as CVE-2020-8141, stems from the node-dot package's reliance on the Function() constructor for template compilation. This design flaw allows attackers to inject arbitrary code into the templates, potentially leading to remote code execution. If an attacker can control the template content or the properties of Object.prototype, they can execute malicious JavaScript code in the context of the application, compromising its integrity and security. The CVSS score for this vulnerability is 8.8, indicating a high severity level.

How To Fix

Minimum fixed version

1.1.3+ds-1

This is the first release that contains the fix.

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

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

Workaround

If immediate upgrading is not feasible, consider implementing input validation and sanitization to restrict user inputs that may be used in templates. This can help mitigate the risk of code injection until the package is updated. Additionally, avoid using the Function() constructor directly in your templates.

Conclusion

The node-dot package has a critical vulnerability (CVE-2020-8141) that can lead to severe security risks if not addressed. Upgrading to the latest version is crucial to ensure the security of applications using this package. Implementing workarounds can provide temporary relief, but a permanent fix through upgrading is essential.

See every vulnerability recorded for node-dot →

Share this vulnerability

FAQ

CVE-2020-8141 is a vulnerability in the node-dot package that allows for template injection due to the use of the Function() constructor, which can lead to remote code execution.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The potential impacts include unauthorized code execution, data breaches, and complete compromise of the affected application.

Yes, you can implement input validation and sanitization to restrict user inputs in templates as a temporary measure.

It is recommended to upgrade to node-dot version 1.1.3+ds-1 or later to mitigate the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for node-dot.

How To Fix

Minimum fixed version

1.1.3+ds-1

This is the first release that contains the fix.

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

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