Vulnerabilities in pkg:npm/mem
PACKAGEGHSA-4xcv-9jjx-gfj3 is a MODERATE (CVSS 5.1) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Mem libraries in the npm ecosystem. The issue involves denial of service in mem. Remediation is available by upgrading affected packages to version 4.0.0.
pkg:npm/mem
Vulnerability advisories affecting package pkg:npm/mem. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4xcv-9jjx-gfj3 | - | MODERATE | Denial of Service in mem |
GHSA-4xcv-9jjx-gfj3 at a Glance
Security Impact
CVSS: 5.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-4xcv-9jjx-gfj3
To remediate this vulnerability, upgrade all affected Mem dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mem@4.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mem
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-4xcv-9jjx-gfj3, inspect your project dependencies using npm:
npm ls mem
Analyze the terminal output to locate any version of Mem in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0), your application is affected.
Note: The npm ls mem 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Mem, 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
GHSA-4xcv-9jjx-gfj3 Affected Mem Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mem
|
npm |
< 4.0.0
|
4.0.0
|
References
Frequently Asked Questions
What is GHSA-4xcv-9jjx-gfj3?
Which Mem versions are affected?
What version fixes GHSA-4xcv-9jjx-gfj3?
Is mem affected?
What is the CVSS score of GHSA-4xcv-9jjx-gfj3?
What CWE is associated with GHSA-4xcv-9jjx-gfj3?
How can I check npm dependencies for GHSA-4xcv-9jjx-gfj3?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4xcv-9jjx-gfj3",
"modified" : "2021-08-17T15:44:45Z",
"published" : "2019-07-05T21:07:58Z",
"aliases" : [ ],
"summary" : "Denial of Service in mem",
"details" : "Versions of `mem` prior to 4.0.0 are vulnerable to Denial of Service (DoS). The package fails to remove old values from the cache even after a value passes its `maxAge` property. This may allow attackers to exhaust the system's memory if they are able to abuse the application logging.\n\n\n## Recommendation\n\nUpgrade to version 4.0.0 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mem"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sindresorhus/mem/commit/da4e4398cb27b602de3bd55f746efa9b4a31702b"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1623744"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/npm:mem:20180117"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1084"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-07-03T20:52:42Z",
"nvd_published_at" : null
}
}