Vulnerabilities in pkg:npm/@lambda-middleware/json-deserializer

PACKAGE
Advisory Identifier: GHSA-m3f4-957x-m785
Advisory Summary

CVE-2021-4437 is a LOW (CVSS 3.5) lambda-middleware inefficient regular expression complexity vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting @lambda middleware/json deserializer libraries in the npm ecosystem. The issue involves lambda-middleware inefficient regular expression complexity vulnerability. Remediation is available by upgrading affected packages to version 1.1.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@lambda-middleware/json-deserializer

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@lambda-middleware/json-deserializer. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m3f4-957x-m785 CVE-2021-4437 LOW lambda-middleware Inefficient Regular Expression Complexity vulnerability

CVE-2021-4437 at a Glance

CVE Identifier CVE-2021-4437
GHSA Identifier GHSA-m3f4-957x-m785
Severity LOW
CVSS v3.1 Base Score 3.5
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product @lambda middleware/json deserializer
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.5

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

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

How to Fix CVE-2021-4437

To remediate this vulnerability, upgrade all affected @lambda middleware/json deserializer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@lambda-middleware/json-deserializer fixed: 1.1.0
npm install @lambda-middleware/json-deserializer@1.1.0
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 @lambda-middleware/json-deserializer

How to Check if You Are Affected

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

npm ls @lambda-middleware/json-deserializer

Analyze the terminal output to locate any version of @lambda middleware/json deserializer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.

Note: The npm ls @lambda-middleware/json-deserializer 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In @lambda middleware/json deserializer, 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

A vulnerability, which was classified as problematic, has been found in dbartholomae lambda-middleware frameguard up to 1.0.4. Affected by this issue is some unknown functionality of the file packages/json-deserializer/src/JsonDeserializer.ts of the component JSON Mime-Type Handler. The manipulation leads to inefficient regular expression complexity. Upgrading to version 1.1.0 is able to address this issue. The patch is identified as f689404d830cbc1edd6a1018d3334ff5f44dc6a6. It is recommended to upgrade the affected component. VDB-253406 is the identifier assigned to this vulnerability.

CVE-2021-4437 Affected @lambda middleware/json deserializer Versions

1 component(s)
Fixed Versions:
1.1.0
Product / Package Ecosystem Affected Versions Fixed Version
@lambda-middleware/json-deserializer
npm
< 1.1.0
1.1.0

References

Frequently Asked Questions

What is CVE-2021-4437?
CVE-2021-4437 is a security vulnerability in @lambda middleware/json deserializer involving lambda-middleware Inefficient Regular Expression Complexity vulnerability under CWE-1333: Inefficient Regular Expression Complexity.
Which @lambda middleware/json deserializer versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: @lambda-middleware/json-deserializer.
What version fixes CVE-2021-4437?
Upgrading to 1.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @lambda-middleware/json-deserializer affected?
Yes, @lambda-middleware/json-deserializer is affected in releases prior to 1.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2021-4437?
CVE-2021-4437 has a CVSS v3.1 base score of 3.5 (LOW) with vector string CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2021-4437?
CVE-2021-4437 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2021-4437?
Run the dependency tree command: 'npm ls @lambda-middleware/json-deserializer'. 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-m3f4-957x-m785",
  "modified" : "2024-03-01T14:41:48Z",
  "published" : "2024-02-12T21:30:55Z",
  "aliases" : [ "CVE-2021-4437" ],
  "summary" : "lambda-middleware Inefficient Regular Expression Complexity vulnerability",
  "details" : "A vulnerability, which was classified as problematic, has been found in dbartholomae lambda-middleware frameguard up to 1.0.4. Affected by this issue is some unknown functionality of the file packages/json-deserializer/src/JsonDeserializer.ts of the component JSON Mime-Type Handler. The manipulation leads to inefficient regular expression complexity. Upgrading to version 1.1.0 is able to address this issue. The patch is identified as f689404d830cbc1edd6a1018d3334ff5f44dc6a6. It is recommended to upgrade the affected component. VDB-253406 is the identifier assigned to this vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@lambda-middleware/json-deserializer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4437"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dbartholomae/lambda-middleware/pull/57"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dbartholomae/lambda-middleware/commit/f689404d830cbc1edd6a1018d3334ff5f44dc6a6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dbartholomae/lambda-middleware"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dbartholomae/lambda-middleware/releases/tag/%40lambda-middleware%2Fframeguard_v1.1.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dbartholomae/lambda-middleware/releases/tag/@lambda-middleware/frameguard_v1.1.0"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.253406"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.253406"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-12T22:39:30Z",
    "nvd_published_at" : "2024-02-12T20:15:07Z"
  }
}