CVE-2020-7677: Unsafe `eval` calls in thenify package

thenify Updated 02 Oct 2025

Summary

18/07/2022
Yes i
Critical
9.8

CVE-2020-7677: thenify before 3.3.1 made use of unsafe calls to eval. Affects thenify versions < 3.3.1. Fixed in 3.3.1. How to fix ↓

Also tracked for

The same CVE-2020-7677 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

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 thenify package is an npm module that provides a utility function for converting callback-based functions into Promise-based functions. It is commonly used in JavaScript applications to simplify asynchronous programming. The package allows developers to wrap callback-style functions and use them with Promises, improving code readability and maintainability. However, versions of thenify prior to 3.3.1 contain a vulnerability that makes use of unsafe calls to eval. This vulnerability can be exploited by an attacker to execute arbitrary code on the host system.

Vulnerability Detail

The vulnerability in thenify versions prior to 3.3.1 arises from the use of unsafe calls to eval. This allows an attacker to inject malicious code into user input, which is then executed by the eval function. As a result, the attacker can achieve arbitrary code execution on the host system. This can lead to various security risks, including unauthorized access, data breaches, and system compromise. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.

How To Fix

Minimum fixed version

3.3.1

This is the first release that contains the fix.

npm install thenify@3.3.1

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 to the fixed version of the thenify package to ensure the security of the application.

Conclusion

The thenify package prior to version 3.3.1 contains a critical vulnerability that allows arbitrary code execution. To mitigate this risk, it is recommended to update the package to version 3.3.1 or later. Failure to address this vulnerability can result in unauthorized access, data breaches, and system compromise. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for thenify →

Share this vulnerability

FAQ

thenify is an npm package that provides a utility function for converting callback-based functions into Promise-based functions. It simplifies asynchronous programming in JavaScript applications.

The vulnerability allows an attacker to execute arbitrary code on the host system. This can lead to unauthorized access, data breaches, and system compromise.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities using package-lock.json.

Yes, the vulnerability can be fixed by updating the thenify package to version 3.3.1 or later. The update removes the unsafe calls to eval.

There are no known workarounds for this vulnerability. It is crucial to update to the fixed version of the thenify package.

How To Fix

Minimum fixed version

3.3.1

This is the first release that contains the fix.

npm install thenify@3.3.1

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