CVE-2021-23335: LDAP Injection in is-user-valid

is-user-valid Updated 02 Oct 2025

Summary

13/04/2021
No i
High
7.5

CVE-2021-23335: LDAP Injection in is-user-valid. Affects is-user-valid versions < 1.1.2. 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 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

The is-user-valid package is an npm package used for user validation. It provides functionality to check if a user is valid based on certain criteria. The package is commonly used in web applications for user authentication and authorization. However, all versions of the package are vulnerable to LDAP Injection, which can lead to either authentication bypass or information exposure.

Vulnerability Detail

LDAP Injection is a type of attack where an attacker can manipulate LDAP queries by injecting malicious input. In the case of is-user-valid, this vulnerability allows an attacker to bypass authentication or gain unauthorized access to sensitive information. By injecting specially crafted input, an attacker can modify the LDAP query used for user validation, potentially bypassing any authentication checks or retrieving sensitive data. This vulnerability poses a high risk to the security of applications using the is-user-valid package.

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 implement input validation and sanitization to prevent LDAP Injection attacks. This involves validating and sanitizing user input before using it in LDAP queries. Here is an example of how input validation and sanitization can be done in JavaScript:

const sanitizeInput = (input) => {
  // Implement input sanitization logic here
  return sanitizedInput;
}

const userInput = req.body.username;
const sanitizedInput = sanitizeInput(userInput);

// Use sanitizedInput in LDAP query

Conclusion

The is-user-valid package is vulnerable to LDAP Injection, which can lead to authentication bypass or information exposure. It is crucial to update the package to a non-vulnerable version and implement input validation and sanitization to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for is-user-valid →

Share this vulnerability

FAQ

LDAP Injection is a type of attack where an attacker can manipulate LDAP queries by injecting malicious input. It can lead to authentication bypass or information exposure.

is-user-valid is an npm package used for user validation in web applications. It is vulnerable to LDAP Injection.

This vulnerability can allow attackers to bypass authentication or gain unauthorized access to sensitive information.

To fix this vulnerability, update the is-user-valid package to a non-vulnerable version and implement input validation and sanitization.

Yes, all versions of the is-user-valid package are vulnerable to LDAP Injection.

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