CVE-2021-23335: Is user valid LDAP Injection Vulnerability

HIGH
Advisory Identifier: GHSA-22cm-3qf2-2wc7
CVSS 7.5
CWE-74 CWE-90
Published
Advisory Summary

CVE-2021-23335 is a HIGH (CVSS 7.5) ldap injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Is user valid libraries in the npm ecosystem. The issue involves ldap injection in is-user-valid. Remediation is available in the latest vendor maintenance releases.

CVE-2021-23335 at a Glance

CVE Identifier CVE-2021-23335
GHSA Identifier GHSA-22cm-3qf2-2wc7
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Is user valid
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2021-23335

To remediate this vulnerability, upgrade all affected Is user valid dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

is-user-valid fixed: Latest secure release
npm install is-user-valid@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls is-user-valid

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-23335, inspect your project dependencies using npm:

npm ls is-user-valid

Analyze the terminal output to locate any version of Is user valid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls is-user-valid command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Is user valid, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

All versions of package is-user-valid are vulnerable to LDAP Injection which can lead to either authentication bypass or information exposure.

CVE-2021-23335 Affected Is user valid Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
is-user-valid
npm
≤ 1.1.2

References

Frequently Asked Questions

What is CVE-2021-23335?
CVE-2021-23335 is a security vulnerability in Is user valid involving LDAP Injection in is-user-valid under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Is user valid versions are affected?
Affected versions include releases prior to current release patches across affected packages: is-user-valid.
What version fixes CVE-2021-23335?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is is-user-valid affected?
Yes, is-user-valid is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-23335?
CVE-2021-23335 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-23335?
CVE-2021-23335 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2021-23335?
Run the dependency tree command: 'npm ls is-user-valid'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-22cm-3qf2-2wc7",
  "modified" : "2021-04-01T23:39:38Z",
  "published" : "2021-04-13T15:30:27Z",
  "aliases" : [ "CVE-2021-23335" ],
  "summary" : "LDAP Injection in is-user-valid",
  "details" : "All versions of package is-user-valid are vulnerable to LDAP Injection which can lead to either authentication bypass or information exposure.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "is-user-valid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23335"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-ISUSERVALID-1056766"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-90" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-01T23:39:38Z",
    "nvd_published_at" : "2021-02-11T12:15:00Z"
  }
}