CVE-2021-23396: Prototype Pollution in lutils

lutils Updated 02 Oct 2025

Summary

21/06/2021
No i
Moderate
5.6

CVE-2021-23396: Prototype Pollution in lutils. Affects lutils versions < 2.4.0. 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 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

lutils is an npm package that provides utility functions for JavaScript applications. It is susceptible to a vulnerability known as Prototype Pollution, which affects the main (merge) function in all versions of the package.

Vulnerability Detail

Prototype Pollution is a vulnerability that allows an attacker to modify the prototype of an object, leading to unexpected behavior and potential security issues. In the case of lutils, this vulnerability can be exploited through the main function, enabling an attacker to pollute the prototype chain and potentially execute arbitrary code or modify existing objects.

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

As a temporary workaround, developers can avoid using the main function in lutils or implement input validation and sanitization to prevent malicious payloads from polluting the prototype chain. Here is an example of input validation for the merge function:

function merge(obj1, obj2) {
  if (typeof obj1 !== 'object' || typeof obj2 !== 'object') {
    throw new Error('Invalid input');
  }

  // Merge logic
}

Conclusion

lutils is vulnerable to Prototype Pollution via the main (merge) function. To fix this issue, it is crucial to update lutils to a version that is not affected by the vulnerability. Implementing input validation and sanitization can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for lutils →

Share this vulnerability

FAQ

Prototype Pollution is a vulnerability that allows an attacker to modify the prototype of an object, leading to unexpected behavior and potential security issues.

The Prototype Pollution vulnerability affects the main (merge) function in all versions of lutils, allowing an attacker to pollute the prototype chain and potentially execute arbitrary code or modify existing objects.

The impact of this vulnerability depends on how lutils is used within an application. If the main function is used with untrusted input, an attacker could manipulate the prototype chain and potentially execute malicious code or modify critical objects.

Yes, all versions of lutils up to and including 2.4.0 are affected by the Prototype Pollution vulnerability.

To mitigate the risk of this vulnerability, it is recommended to update lutils to a version beyond 2.4.0, as the vulnerability was introduced in version 0 and affects all versions up to 2.4.0.

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