CVE-2021-23771: Sandbox escape in notevil and argencoders-notevil

notevil Updated 02 Oct 2025

Summary

18/03/2022
No i
Moderate
6.5

CVE-2021-23771: Sandbox escape in notevil and argencoders-notevil. Affects notevil versions < 1.3.3. No fix is published. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The notevil package is an npm package that provides a sandbox environment for executing untrusted JavaScript code. It is commonly used for tasks such as code evaluation and dynamic code generation. The argencoders-notevil package is a fork of notevil that adds additional features and functionality. Both packages are vulnerable to a Sandbox Escape leading to Prototype pollution. This vulnerability allows an attacker to add or modify an object's prototype, potentially leading to arbitrary code execution or information disclosure.

Vulnerability Detail

The vulnerability arises from a failure to restrict access to the main context in both the notevil and argencoders-notevil packages. This allows an attacker to bypass the sandbox environment and manipulate the prototype of an object. By modifying the prototype, an attacker can introduce malicious behavior into the code execution, potentially leading to remote code execution or other security issues. This vulnerability has been assigned a CVSS score of 6.5, indicating a moderate severity.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If updating to the latest version is not immediately possible, a temporary workaround is to avoid using the affected packages in scenarios where untrusted code execution is required. Instead, consider using alternative sandboxing solutions or implementing custom security measures to mitigate the risk of prototype pollution.

Conclusion

The notevil and argencoders-notevil packages are vulnerable to a Sandbox Escape leading to Prototype pollution. It is crucial to update to the latest patched versions of these packages to mitigate the risk of remote code execution and other security issues. If immediate updating is not possible, consider using alternative sandboxing solutions or implementing custom security measures. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for notevil →

Share this vulnerability

FAQ

Prototype pollution is a vulnerability that occurs when an attacker is able to modify the prototype of an object, leading to unexpected behavior or security issues. In the context of JavaScript, this can allow an attacker to modify built-in objects or introduce malicious behavior into the code execution.

Yes, all versions of the notevil and argencoders-notevil packages are vulnerable to this sandbox escape vulnerability. It is recommended to update to the latest patched version to mitigate the risk.

At the time of this advisory, there are no known public exploits for this vulnerability. However, it is important to apply the recommended patches and security updates to prevent potential exploitation.

Yes, this vulnerability can be exploited remotely if an attacker is able to execute untrusted code within the affected sandbox environment. By manipulating the prototype of an object, an attacker can potentially execute arbitrary code or access sensitive information.

Yes, there are alternative sandboxing solutions available in the JavaScript ecosystem. Some popular options include vm2, sandbox, and js-slang. These packages provide similar functionality to notevil and argencoders-notevil but may have different security implementations.

Related vulnerabilities

Recent vulnerabilities recorded for notevil.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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