Vulnerabilities in pkg:npm/pouchdb
PACKAGECVE-2016-10546 is a CRITICAL arbitrary code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Pouchdb libraries in the npm ecosystem. The issue involves arbitrary code injection in pouchdb. Remediation is available by upgrading affected packages to version 6.0.5.
pkg:npm/pouchdb
Vulnerability advisories affecting package pkg:npm/pouchdb. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-cgqv-x5cx-xvqh | CVE-2016-10546 | CRITICAL | Arbitrary Code Injection in pouchdb |
CVE-2016-10546 at a Glance
How to Fix CVE-2016-10546
To remediate this vulnerability, upgrade all affected Pouchdb 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 pouchdb@6.0.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls pouchdb
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2016-10546, inspect your project dependencies using npm:
npm ls pouchdb
Analyze the terminal output to locate any version of Pouchdb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.5), your application is affected.
Note: The npm ls pouchdb 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 Pouchdb, 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-2016-10546 Affected Pouchdb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pouchdb
|
npm |
< 6.0.5
|
6.0.5
|
References
Frequently Asked Questions
What is CVE-2016-10546?
Which Pouchdb versions are affected?
What version fixes CVE-2016-10546?
Is pouchdb affected?
What CWE is associated with CVE-2016-10546?
How can I check npm dependencies for CVE-2016-10546?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cgqv-x5cx-xvqh",
"modified" : "2020-08-31T18:12:18Z",
"published" : "2018-07-26T16:22:08Z",
"aliases" : [ "CVE-2016-10546" ],
"summary" : "Arbitrary Code Injection in pouchdb",
"details" : "Affected versions of `pouchdb` do not properly sandbox the code execution engine which executes the map/reduce functions for temporary views and design documents. Under certain circumstances, an attacker could uses this to run arbitrary code on the server.\n\n\n## Recommendation\n\nUpdate to version 6.0.5 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "pouchdb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.0.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10546"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-cgqv-x5cx-xvqh"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/143"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:31:41Z",
"nvd_published_at" : null
}
}