CVE-2021-3777: Inefficient Regular Expression Complexity in tmpl

tmpl Updated 02 Oct 2025

Summary

20/09/2021
Yes i
High
7.5

CVE-2021-3777: tmpl vulnerable to Inefficient Regular Expression Complexity which may lead to resource exhaustion. Affects tmpl versions < 1.0.5. Fixed in 1.0.5. 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

tmpl is a simple string formatting package in the npm ecosystem. It provides a templating mechanism for generating strings by replacing placeholders with corresponding values. tmpl is vulnerable to an Inefficient Regular Expression Complexity issue, which can lead to resource exhaustion.

Vulnerability Detail

The vulnerability in tmpl arises from inefficient regular expressions, which can result in excessive backtracking and cause the application to consume excessive resources. An attacker can exploit this vulnerability by providing specially crafted input that triggers the inefficient regular expression, leading to denial of service or resource exhaustion. The impact of this vulnerability can be severe, potentially disrupting the availability of the affected application.

How To Fix

Latest published version: 1.0.5 as of 22 Oct 2026

npm install tmpl@1.0.5

The newest release already contains this fix.

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 essential to update the tmpl package to the fixed version to mitigate the risk.

Conclusion

In summary, tmpl is vulnerable to an Inefficient Regular Expression Complexity issue, which can lead to resource exhaustion or denial of service. To mitigate this vulnerability, it is crucial to update the tmpl package to version 1.0.5 or later. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for tmpl →

Share this vulnerability

FAQ

tmpl is a simple string formatting package in the npm ecosystem. It provides a templating mechanism for generating strings by replacing placeholders with corresponding values.

The vulnerability can lead to resource exhaustion or denial of service, potentially disrupting the availability of the affected application.

To fix this vulnerability, update the tmpl package to version 1.0.5 or later by running the command: npm install tmpl@1.0.5

There is no known workaround for this vulnerability. It is crucial to update the tmpl package to the fixed version.

How To Fix

Latest published version: 1.0.5 as of 22 Oct 2026

npm install tmpl@1.0.5

The newest release already contains this fix.

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