Vulnerabilities in pkg:npm/mithril
PACKAGEGHSA-c3px-v9c7-m734 is a HIGH prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Mithril libraries in the npm ecosystem. The issue involves prototype pollution in mithril. Remediation is available by upgrading affected packages to version 1.1.7, 2.0.2.
pkg:npm/mithril
Vulnerability advisories affecting package pkg:npm/mithril. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-c3px-v9c7-m734 | - | HIGH | Prototype Pollution in mithril |
GHSA-c3px-v9c7-m734 at a Glance
How to Fix GHSA-c3px-v9c7-m734
To remediate this vulnerability, upgrade all affected Mithril 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 mithril@1.1.7
npm install mithril@2.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mithril
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-c3px-v9c7-m734, inspect your project dependencies using npm:
npm ls mithril
Analyze the terminal output to locate any version of Mithril in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.7), your application is affected.
Note: The npm ls mithril 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Mithril, 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-c3px-v9c7-m734 Affected Mithril Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mithril
|
npm |
< 1.1.7
|
1.1.7
|
|
mithril
|
npm |
≥ 2.0.0
< 2.0.2
|
2.0.2
|
References
Frequently Asked Questions
What is GHSA-c3px-v9c7-m734?
Which Mithril versions are affected?
What version fixes GHSA-c3px-v9c7-m734?
Is mithril affected?
What CWE is associated with GHSA-c3px-v9c7-m734?
How can I check npm dependencies for GHSA-c3px-v9c7-m734?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c3px-v9c7-m734",
"modified" : "2020-08-31T18:47:02Z",
"published" : "2020-09-03T19:04:39Z",
"aliases" : [ ],
"summary" : "Prototype Pollution in mithril",
"details" : "Affected versions of `mithril`are vulnerable to prototype pollution. The function `parseQueryString` may allow a malicious user to modify the prototype of `Object`, causing the addition or modification of an existing property that will exist on all objects. A payload such as `__proto__%5BtoString%5D=123` in the query string would change the `toString()` function to `123`.\n\n\n\n## Recommendation\n\nIf you are using mithril 2.x, upgrade to version 2.0.2 or later.\nIf you are using mithril 1.x, upgrade to version 1.1.7 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mithril"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mithril"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1094"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:47:02Z",
"nvd_published_at" : null
}
}