CVE-2020-8141: dot - Improper Control of Generation of Code in doT

dot Updated 02 Oct 2025

Summary

24/05/2022
Yes i
High
8.8

CVE-2020-8141: Improper Control of Generation of Code in doT. Affects dot versions < 1.1.3. Fixed in 1.1.3. How to fix ↓

Also tracked for

The same CVE-2020-8141 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The dot package is an npm package that provides a templating engine called doT. It is used to compile templates by using the Function() method. However, in version 1.1.2 of the dot package, there is an improper control of the generation of code, which can be exploited by an attacker. This vulnerability can be triggered if the attacker can control the template or the value set on Object.prototype.

Vulnerability Detail

The vulnerability in the dot package allows an attacker to execute arbitrary code by controlling the template or the value set on Object.prototype. By exploiting this vulnerability, an attacker can potentially execute malicious code on the target system, leading to various consequences such as remote code execution, information disclosure, or denial of service.

How To Fix

Minimum fixed version

1.1.3

This is the first release that contains the fix.

npm install dot@1.1.3

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

Workaround

There is no known workaround for this vulnerability. It is recommended to update the dot package to the latest version as soon as possible.

Conclusion

In conclusion, the dot package version 1.1.2 is vulnerable to an improper control of code generation in doT. This vulnerability can be exploited by an attacker to execute arbitrary code on the target system. To mitigate this vulnerability, it is recommended to update the dot package to version 1.1.3 or later. If you need further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for dot →

Share this vulnerability

FAQ

This vulnerability allows an attacker to execute arbitrary code on the target system, potentially leading to remote code execution, information disclosure, or denial of service.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it for any open-source vulnerabilities, including this one.

Yes, the fix for this vulnerability is available in version 1.1.3 of the dot package. It is recommended to update to this version or later to mitigate the vulnerability.

No, there are no known workarounds for this vulnerability. It is recommended to update the dot package to the latest version.

Related vulnerabilities

Recent vulnerabilities recorded for dot.

How To Fix

Minimum fixed version

1.1.3

This is the first release that contains the fix.

npm install dot@1.1.3

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