Vulnerabilities in pkg:npm/loopback-connector-mongodb
PACKAGEGHSA-hxwc-5vw9-2w4w is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Loopback connector mongodb libraries in the npm ecosystem. The issue involves nosql injection in loopback-connector-mongodb. Remediation is available by upgrading affected packages to version 3.6.0.
pkg:npm/loopback-connector-mongodb
Vulnerability advisories affecting package pkg:npm/loopback-connector-mongodb. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-hxwc-5vw9-2w4w | - | HIGH | NoSQL Injection in loopback-connector-mongodb |
| GHSA-m734-r4g6-34f9 | - | HIGH | NoSQL Injection in loopback-connector-mongodb |
GHSA-hxwc-5vw9-2w4w at a Glance
How to Fix GHSA-hxwc-5vw9-2w4w
To remediate this vulnerability, upgrade all affected Loopback connector mongodb 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 loopback-connector-mongodb@3.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls loopback-connector-mongodb
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-hxwc-5vw9-2w4w, inspect your project dependencies using npm:
npm ls loopback-connector-mongodb
Analyze the terminal output to locate any version of Loopback connector mongodb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.0), your application is affected.
Note: The npm ls loopback-connector-mongodb 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Loopback connector mongodb, 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-hxwc-5vw9-2w4w Affected Loopback connector mongodb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
loopback-connector-mongodb
|
npm |
< 3.6.0
|
3.6.0
|
References
Frequently Asked Questions
What is GHSA-hxwc-5vw9-2w4w?
Which Loopback connector mongodb versions are affected?
What version fixes GHSA-hxwc-5vw9-2w4w?
Is loopback-connector-mongodb affected?
What CWE is associated with GHSA-hxwc-5vw9-2w4w?
How can I check npm dependencies for GHSA-hxwc-5vw9-2w4w?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hxwc-5vw9-2w4w",
"modified" : "2021-09-27T15:13:26Z",
"published" : "2020-09-02T15:52:39Z",
"aliases" : [ ],
"summary" : "NoSQL Injection in loopback-connector-mongodb",
"details" : "Versions of `loopback-connector-mongodb` prior to 3.6.0 are vulnerable to NoSQL Injection. Filters passed to the database query are not properly sanitized which leads to execution of code on the database driver and data leak.\n\n\n## Recommendation\n\nUpgrade to version 3.6.0 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "loopback-connector-mongodb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.6.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.5.0"
}
} ],
"references" : [ {
"type" : "PACKAGE",
"url" : "https://github.com/loopbackio/loopback-connector-mongodb"
}, {
"type" : "WEB",
"url" : "https://loopback.io/doc/en/lb3/Security-advisory-08-15-2018.html"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/767"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:35:00Z",
"nvd_published_at" : null
}
}