Vulnerabilities in pkg:npm/mquery
PACKAGECVE-2020-35149 is a MODERATE (CVSS 5.3) code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Mquery libraries in the npm ecosystem. The issue involves code injection in mquery. Remediation is available by upgrading affected packages to version 3.2.3.
pkg:npm/mquery
Vulnerability advisories affecting package pkg:npm/mquery. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-45q2-34rf-mr94 | CVE-2020-35149 | MODERATE | Code Injection in mquery |
CVE-2020-35149 at a Glance
Security Impact
CVSS: 5.3
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:N/I:L/A:N).
How to Fix CVE-2020-35149
To remediate this vulnerability, upgrade all affected Mquery 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 mquery@3.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mquery
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-35149, inspect your project dependencies using npm:
npm ls mquery
Analyze the terminal output to locate any version of Mquery in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.3), your application is affected.
Note: The npm ls mquery 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Mquery, 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
CVE-2020-35149 Affected Mquery Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mquery
|
npm |
< 3.2.3
|
3.2.3
|
References
Frequently Asked Questions
What is CVE-2020-35149?
Which Mquery versions are affected?
What version fixes CVE-2020-35149?
Is mquery affected?
What is the CVSS score of CVE-2020-35149?
What CWE is associated with CVE-2020-35149?
How can I check npm dependencies for CVE-2020-35149?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-45q2-34rf-mr94",
"modified" : "2020-12-17T22:54:00Z",
"published" : "2020-12-18T18:23:43Z",
"aliases" : [ "CVE-2020-35149" ],
"summary" : "Code Injection in mquery",
"details" : "lib/utils.js in mquery before 3.2.3 allows a pollution attack because a special property (e.g., __proto__) can be copied during a merge or clone operation.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mquery"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-35149"
}, {
"type" : "WEB",
"url" : "https://github.com/aheckmann/mquery/commit/792e69fd0a7281a0300be5cade5a6d7c1d468ad4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-12-17T22:54:00Z",
"nvd_published_at" : null
}
}