CVE-2021-4437: lambda-middleware Inefficient Regular Expression Complexity vulnerability
3.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.07492%
CWE
Published
2/12/2024
Updated
3/1/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| @lambda-middleware/json-deserializer | npm | < 1.1.0 | 1.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the regex-based MIME type validation in isJsonMimeType. The original regex pattern contained (.++) which creates ambiguity in pattern matching and allows for exponential backtracking on malformed inputs. This was explicitly replaced in the patch (f689404) with a safer string parsing approach, confirming this was the vulnerable component. The CWE-1333 classification and commit message both directly reference regex inefficiency as the issue.