@fabasoad/sarif-to-slack 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/.github/pull_request_template.md +3 -3
- package/.github/workflows/linting.yml +14 -0
- package/.github/workflows/release.yml +5 -1
- package/.github/workflows/send-sarif-to-slack.yml +214 -0
- package/.github/workflows/unit-tests.yml +1 -0
- package/.pre-commit-config.yaml +3 -3
- package/.tool-versions +1 -1
- package/CONTRIBUTING.md +1 -1
- package/Makefile +10 -3
- package/README.md +36 -5
- package/biome.json +15 -12
- package/dist/Logger.js +17 -6
- package/dist/Processors.js +23 -22
- package/dist/SarifToSlackService.d.ts.map +1 -1
- package/dist/SarifToSlackService.js +6 -7
- package/dist/SlackMessageBuilder.js +51 -55
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -5
- package/dist/model/SarifModelPerRun.d.ts +17 -0
- package/dist/model/SarifModelPerRun.d.ts.map +1 -0
- package/dist/model/SarifModelPerRun.js +84 -0
- package/dist/model/SarifModelPerSarif.d.ts +20 -0
- package/dist/model/SarifModelPerSarif.d.ts.map +1 -0
- package/dist/model/SarifModelPerSarif.js +97 -0
- package/dist/model/types.d.ts +17 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/model/types.js +31 -0
- package/dist/sarif-to-slack.d.ts +121 -18
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types.d.ts +107 -15
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +73 -7
- package/dist/utils/SarifUtils.d.ts +5 -0
- package/dist/utils/SarifUtils.d.ts.map +1 -0
- package/dist/utils/SarifUtils.js +32 -0
- package/dist/utils/SortUtils.d.ts +5 -0
- package/dist/utils/SortUtils.d.ts.map +1 -0
- package/dist/utils/SortUtils.js +8 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +4 -0
- package/etc/sarif-to-slack.api.md +47 -9
- package/jest.config.json +4 -4
- package/package.json +14 -10
- package/scripts/save-version.sh +6 -0
- package/src/Logger.ts +22 -17
- package/src/Processors.ts +22 -22
- package/src/SarifToSlackService.ts +6 -7
- package/src/SlackMessageBuilder.ts +85 -68
- package/src/index.ts +17 -6
- package/src/model/SarifModelPerRun.ts +114 -0
- package/src/model/SarifModelPerSarif.ts +116 -0
- package/src/model/types.ts +31 -0
- package/src/types.ts +113 -15
- package/src/utils/SarifUtils.ts +44 -0
- package/src/utils/SortUtils.ts +21 -0
- package/src/version.ts +3 -0
- package/test-data/sarif/codeql-csharp.sarif +1 -0
- package/test-data/sarif/codeql-go.sarif +1 -0
- package/test-data/sarif/codeql-python.sarif +1 -0
- package/test-data/sarif/codeql-ruby.sarif +1 -0
- package/test-data/sarif/codeql-typescript.sarif +1 -0
- package/test-data/sarif/grype-container.sarif +1774 -0
- package/test-data/sarif/runs-1-tools-1-results-0.sarif +18 -0
- package/test-data/sarif/runs-2-tools-1-results-0.sarif +30 -0
- package/test-data/sarif/runs-2-tools-1.sarif +656 -0
- package/test-data/sarif/runs-2-tools-2-results-0.sarif +44 -0
- package/test-data/sarif/runs-2-tools-2.sarif +686 -0
- package/test-data/sarif/runs-3-tools-2-results-0.sarif +48 -0
- package/test-data/sarif/runs-3-tools-2.sarif +278 -0
- package/test-data/sarif/snyk-composer.sarif +934 -0
- package/test-data/sarif/snyk-container.sarif +313 -0
- package/test-data/sarif/snyk-gomodules.sarif +388 -0
- package/test-data/sarif/snyk-gradle.sarif +274 -0
- package/test-data/sarif/snyk-hex.sarif +66 -0
- package/test-data/sarif/snyk-maven.sarif +274 -0
- package/test-data/sarif/snyk-npm.sarif +896 -0
- package/test-data/sarif/snyk-nuget.sarif +90 -0
- package/test-data/sarif/snyk-pip.sarif +66 -0
- package/test-data/sarif/snyk-pnpm.sarif +90 -0
- package/test-data/sarif/snyk-poetry.sarif +1952 -0
- package/test-data/sarif/snyk-rubygems.sarif +440 -0
- package/test-data/sarif/snyk-sbt.sarif +178 -0
- package/test-data/sarif/snyk-swift.sarif +112 -0
- package/test-data/sarif/snyk-yarn.sarif +2900 -0
- package/test-data/sarif/trivy-iac.sarif +134 -0
- package/test-data/sarif/wiz-container.sarif +30916 -0
- package/test-data/sarif/wiz-iac.sarif +558 -0
- package/tests/Processors.spec.ts +3 -3
- package/tests/integration/SendSarifToSlack.spec.ts +56 -0
- package/tsconfig.json +14 -14
- package/dist/Logger.js.map +0 -1
- package/dist/Processors.js.map +0 -1
- package/dist/SarifToSlackService.js.map +0 -1
- package/dist/SlackMessageBuilder.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1,2900 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"runs": [
|
|
5
|
+
{
|
|
6
|
+
"tool": {
|
|
7
|
+
"driver": {
|
|
8
|
+
"name": "Snyk Open Source",
|
|
9
|
+
"properties": {
|
|
10
|
+
"artifactsScanned": 186
|
|
11
|
+
},
|
|
12
|
+
"rules": [
|
|
13
|
+
{
|
|
14
|
+
"id": "SNYK-JS-ANSIREGEX-1583908",
|
|
15
|
+
"shortDescription": {
|
|
16
|
+
"text": "High severity - Regular Expression Denial of Service (ReDoS) vulnerability in ansi-regex"
|
|
17
|
+
},
|
|
18
|
+
"fullDescription": {
|
|
19
|
+
"text": "(CVE-2021-3807) ansi-regex@2.1.1"
|
|
20
|
+
},
|
|
21
|
+
"help": {
|
|
22
|
+
"text": "",
|
|
23
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: ansi-regex\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › ansi-regex@2.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › chalk@1.1.3 › has-ansi@2.0.0 › ansi-regex@2.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › chalk@1.1.3 › strip-ansi@3.0.1 › ansi-regex@2.1.1\n# Overview\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to the sub-patterns` [[\\\\]()#;?]*` and `(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*`.\r\n\r\n\r\n## PoC\r\n```js\r\nimport ansiRegex from 'ansi-regex';\r\n\r\nfor(var i = 1; i <= 50000; i++) {\r\n var time = Date.now();\r\n var attack_str = \"\\u001B[\"+\";\".repeat(i*10000);\r\n ansiRegex().test(attack_str)\r\n var time_cost = Date.now() - time;\r\n console.log(\"attack_str.length: \" + attack_str.length + \": \" + time_cost+\" ms\")\r\n}\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `ansi-regex` to version 3.0.1, 4.1.1, 5.0.1, 6.0.1 or higher.\n# References\n- [GitHub Commit](https://github.com/chalk/ansi-regex/commit/419250fa510bf31b4cc672e76537a64f9332e1f1)\n- [GitHub Commit](https://github.com/chalk/ansi-regex/commit/75a657da7af875b2e2724fd6331bf0a4b23d3c9a)\n- [GitHub Commit](https://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9)\n- [GitHub PR](https://github.com/chalk/ansi-regex/pull/37)\n"
|
|
24
|
+
},
|
|
25
|
+
"properties": {
|
|
26
|
+
"tags": [
|
|
27
|
+
"security",
|
|
28
|
+
"CWE-400",
|
|
29
|
+
"yarn"
|
|
30
|
+
],
|
|
31
|
+
"cvssv3_baseScore": 7.5,
|
|
32
|
+
"security-severity": "7.5"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "SNYK-JS-ASYNC-2441827",
|
|
37
|
+
"shortDescription": {
|
|
38
|
+
"text": "High severity - Prototype Pollution vulnerability in async"
|
|
39
|
+
},
|
|
40
|
+
"fullDescription": {
|
|
41
|
+
"text": "(CVE-2021-43138) async@2.6.2"
|
|
42
|
+
},
|
|
43
|
+
"help": {
|
|
44
|
+
"text": "",
|
|
45
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: async\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2\n# Overview\n\nAffected versions of this package are vulnerable to Prototype Pollution via the `mapValues()` method, due to improper check in `createObjectIterator` function.\r\n\r\n# PoC\r\n\r\n```js\r\n//when objects are parsed, all properties are created as own (the objects can come from outside sources (http requests/ file))\r\nconst hasOwn = JSON.parse('{\"__proto__\": {\"isAdmin\": true}}');\r\n\r\n//does not have the property, because it's inside object's own \"__proto__\"\r\nconsole.log(hasOwn.isAdmin);\r\n\r\nasync.mapValues(hasOwn, (val, key, cb) => cb(null, val), (error, result) => {\r\n // after the method executes, hasOwn.__proto__ value (isAdmin: true) replaces the prototype of the newly created object, leading to potential exploits.\r\n console.log(result.isAdmin);\r\n});\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `async` to version 2.6.4, 3.2.2 or higher.\n# References\n- [GitHub Backport PR](https://github.com/caolan/async/pull/1828)\n- [GitHub Commit](https://github.com/caolan/async/commit/8f7f90342a6571ba1c197d747ebed30c368096d2)\n- [GitHub Commit](https://github.com/caolan/async/commit/e1ecdbf79264f9ab488c7799f4c76996d5dca66d)\n- [PoC](https://jsfiddle.net/oz5twjd9/)\n"
|
|
46
|
+
},
|
|
47
|
+
"properties": {
|
|
48
|
+
"tags": [
|
|
49
|
+
"security",
|
|
50
|
+
"CWE-1321",
|
|
51
|
+
"yarn"
|
|
52
|
+
],
|
|
53
|
+
"cvssv3_baseScore": 7.5,
|
|
54
|
+
"security-severity": "7.5"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "SNYK-JS-AWSSDK-1059424",
|
|
59
|
+
"shortDescription": {
|
|
60
|
+
"text": "High severity - Prototype Pollution vulnerability in aws-sdk"
|
|
61
|
+
},
|
|
62
|
+
"fullDescription": {
|
|
63
|
+
"text": "(CVE-2020-28472) aws-sdk@2.507.0"
|
|
64
|
+
},
|
|
65
|
+
"help": {
|
|
66
|
+
"text": "",
|
|
67
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: aws-sdk\n* Introduced through: server@1.0.0 and aws-sdk@2.507.0\n### Detailed paths\n* _Introduced through_: server@1.0.0 › aws-sdk@2.507.0\n# Overview\n\nAffected versions of this package are vulnerable to Prototype Pollution. If an attacker submits a malicious INI file to an application that parses it with `loadSharedConfigFiles `, they will pollute the prototype on the application. This can be exploited further depending on the context.\r\n\r\n# PoC by Eugene Lim:\r\n\r\npayload.toml:\r\n```\r\n[__proto__]\r\npolluted = \"polluted\"\r\n```\r\n\r\npoc.js:\r\n```\r\nvar fs = require('fs')\r\nvar sharedIniFileLoader = require('@aws-sdk/shared-ini-file-loader')\r\n\r\nasync function main() {\r\nvar parsed = await sharedIniFileLoader.loadSharedConfigFiles({ filepath: './payload.toml' })\r\nconsole.log(parsed)\r\nconsole.log(parsed.__proto__)\r\nconsole.log({}.__proto__)\r\nconsole.log(polluted)\r\n}\r\n\r\nmain()\r\n```\r\n\r\n```\r\n> node poc.js\r\n{\r\nconfigFile: { default: { region: 'ap-southeast-1' } },\r\ncredentialsFile: {}\r\n}\r\n{ polluted: '\"polluted\"' }\r\n{ polluted: '\"polluted\"' }\r\n\"polluted\"\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `aws-sdk` to version 2.814.0 or higher.\n# References\n- [GitHub Commit (v2 SDK)](https://github.com/aws/aws-sdk-js/pull/3585/commits/7d72aff2a941173733fcb6741b104cd83d3bc611)\n- [GitHub Commit (v3 SDK)](https://github.com/aws/aws-sdk-js-v3/commit/a209082dff913939672bb069964b33aa4c5409a9)\n"
|
|
68
|
+
},
|
|
69
|
+
"properties": {
|
|
70
|
+
"tags": [
|
|
71
|
+
"security",
|
|
72
|
+
"CWE-1321",
|
|
73
|
+
"yarn"
|
|
74
|
+
],
|
|
75
|
+
"cvssv3_baseScore": 7.3,
|
|
76
|
+
"security-severity": "7.3"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "snyk:lic:npm:aws-sdk:Apache-2.0",
|
|
81
|
+
"shortDescription": {
|
|
82
|
+
"text": "High severity - Apache-2.0 license vulnerability in aws-sdk"
|
|
83
|
+
},
|
|
84
|
+
"fullDescription": {
|
|
85
|
+
"text": "aws-sdk@2.507.0"
|
|
86
|
+
},
|
|
87
|
+
"help": {
|
|
88
|
+
"text": "",
|
|
89
|
+
"markdown": "* Package Manager: yarn\n* Module: aws-sdk\n* Introduced through: server@1.0.0 and aws-sdk@2.507.0\n### Detailed paths\n* _Introduced through_: server@1.0.0 › aws-sdk@2.507.0\nApache-2.0 license"
|
|
90
|
+
},
|
|
91
|
+
"properties": {
|
|
92
|
+
"tags": [
|
|
93
|
+
"security",
|
|
94
|
+
"yarn"
|
|
95
|
+
],
|
|
96
|
+
"security-severity": "undefined"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "SNYK-JS-BODYPARSER-7926860",
|
|
101
|
+
"shortDescription": {
|
|
102
|
+
"text": "High severity - Asymmetric Resource Consumption (Amplification) vulnerability in body-parser"
|
|
103
|
+
},
|
|
104
|
+
"fullDescription": {
|
|
105
|
+
"text": "(CVE-2024-45590) body-parser@1.19.0"
|
|
106
|
+
},
|
|
107
|
+
"help": {
|
|
108
|
+
"text": "",
|
|
109
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: body-parser\n* Introduced through: server@1.0.0 and body-parser@1.19.0\n### Detailed paths\n* _Introduced through_: server@1.0.0 › body-parser@1.19.0\n* _Introduced through_: server@1.0.0 › express@4.17.1 › body-parser@1.19.0\n# Overview\n\nAffected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) via the `extendedparser` and `urlencoded` functions when the URL encoding process is enabled. An attacker can flood the server with a large number of specially crafted requests.\n# Remediation\nUpgrade `body-parser` to version 1.20.3 or higher.\n# References\n- [GitHub Commit](https://github.com/expressjs/body-parser/commit/b2695c4450f06ba3b0ccf48d872a229bb41c9bce)\n"
|
|
110
|
+
},
|
|
111
|
+
"properties": {
|
|
112
|
+
"tags": [
|
|
113
|
+
"security",
|
|
114
|
+
"CWE-405",
|
|
115
|
+
"yarn"
|
|
116
|
+
],
|
|
117
|
+
"cvssv3_baseScore": 8.2,
|
|
118
|
+
"security-severity": "8.2"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "SNYK-JS-BSON-561052",
|
|
123
|
+
"shortDescription": {
|
|
124
|
+
"text": "High severity - Internal Property Tampering vulnerability in bson"
|
|
125
|
+
},
|
|
126
|
+
"fullDescription": {
|
|
127
|
+
"text": "(CVE-2020-7610) bson@1.1.1"
|
|
128
|
+
},
|
|
129
|
+
"help": {
|
|
130
|
+
"text": "",
|
|
131
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: bson\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › bson@1.1.1\n# Overview\n[bson](https://www.npmjs.com/package/bson) is a BSON Parser for node and browser.\n\nAffected versions of this package are vulnerable to Internal Property Tampering. The package will ignore an unknown value for an object's `_bsotype`, leading to cases where an object is serialized as a document rather than the intended BSON type.\n\n\n **NOTE:** This vulnerability has also been identified as: [CVE-2019-2391](https://security.snyk.io/vuln/SNYK-JS-BSON-6056525)\n\n# Remediation\nUpgrade `bson` to version 1.1.4 or higher.\n# References\n- [GitHub Commit](https://github.com/mongodb/js-bson/commit/3809c1313a7b2a8001065f0271199df9fa3d16a8)\n- [Release Note](https://github.com/mongodb/js-bson/releases/tag/v1.1.4)\n"
|
|
132
|
+
},
|
|
133
|
+
"properties": {
|
|
134
|
+
"tags": [
|
|
135
|
+
"security",
|
|
136
|
+
"CWE-642",
|
|
137
|
+
"yarn"
|
|
138
|
+
],
|
|
139
|
+
"cvssv3_baseScore": 8.1,
|
|
140
|
+
"security-severity": "8.1"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "SNYK-JS-BSON-6056525",
|
|
145
|
+
"shortDescription": {
|
|
146
|
+
"text": "High severity - Internal Property Tampering vulnerability in bson"
|
|
147
|
+
},
|
|
148
|
+
"fullDescription": {
|
|
149
|
+
"text": "(CVE-2019-2391) bson@1.1.1"
|
|
150
|
+
},
|
|
151
|
+
"help": {
|
|
152
|
+
"text": "",
|
|
153
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: bson\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › bson@1.1.1\n# Overview\n[bson](https://www.npmjs.com/package/bson) is a BSON Parser for node and browser.\n\nAffected versions of this package are vulnerable to Internal Property Tampering. The package will ignore an unknown value for an object's `_bsotype`, leading to cases where an object is serialized as a document rather than the intended BSON type.\n\n\n **NOTE:** This vulnerability has also been identified as: [CVE-2020-7610](https://security.snyk.io/vuln/SNYK-JS-BSON-561052)\n\n# Remediation\nUpgrade `bson` to version 1.1.4 or higher.\n# References\n- [GitHub Commit](https://github.com/mongodb/js-bson/commit/3809c1313a7b2a8001065f0271199df9fa3d16a8)\n- [Release Note](https://github.com/mongodb/js-bson/releases/tag/v1.1.4)\n"
|
|
154
|
+
},
|
|
155
|
+
"properties": {
|
|
156
|
+
"tags": [
|
|
157
|
+
"security",
|
|
158
|
+
"CWE-642",
|
|
159
|
+
"yarn"
|
|
160
|
+
],
|
|
161
|
+
"cvssv3_baseScore": 8.1,
|
|
162
|
+
"security-severity": "8.1"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "snyk:lic:npm:bson:Apache-2.0",
|
|
167
|
+
"shortDescription": {
|
|
168
|
+
"text": "High severity - Apache-2.0 license vulnerability in bson"
|
|
169
|
+
},
|
|
170
|
+
"fullDescription": {
|
|
171
|
+
"text": "bson@1.1.1"
|
|
172
|
+
},
|
|
173
|
+
"help": {
|
|
174
|
+
"text": "",
|
|
175
|
+
"markdown": "* Package Manager: yarn\n* Module: bson\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › bson@1.1.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › bson@1.1.1\nApache-2.0 license"
|
|
176
|
+
},
|
|
177
|
+
"properties": {
|
|
178
|
+
"tags": [
|
|
179
|
+
"security",
|
|
180
|
+
"yarn"
|
|
181
|
+
],
|
|
182
|
+
"security-severity": "undefined"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "SNYK-JS-COOKIE-8163060",
|
|
187
|
+
"shortDescription": {
|
|
188
|
+
"text": "Medium severity - Cross-site Scripting (XSS) vulnerability in cookie"
|
|
189
|
+
},
|
|
190
|
+
"fullDescription": {
|
|
191
|
+
"text": "(CVE-2024-47764) cookie@0.4.0"
|
|
192
|
+
},
|
|
193
|
+
"help": {
|
|
194
|
+
"text": "",
|
|
195
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: cookie\n* Introduced through: server@1.0.0, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › express@4.17.1 › cookie@0.4.0\n# Overview\n\nAffected versions of this package are vulnerable to Cross-site Scripting (XSS) via the cookie `name`, `path`, or `domain`, which can be used to set unexpected values to other cookie fields.\r\n\r\n# Workaround\r\nUsers who are not able to upgrade to the fixed version should avoid passing untrusted or arbitrary values for the cookie fields and ensure they are set by the application instead of user input.\n# Details\n\nA cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.\n\nThis is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.\n\nInjecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.\n\nEscaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, `<` can be coded as `<`; and `>` can be coded as `>`; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses `<` and `>` as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.\n \nThe most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. \n\n## Types of attacks\nThere are a few methods by which XSS can be manipulated:\n\n|Type|Origin|Description|\n|--|--|--|\n|**Stored**|Server|The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.|\n|**Reflected**|Server|The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.| \n|**DOM-based**|Client|The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.|\n|**Mutated**| |The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.|\n\n## Affected environments\nThe following environments are susceptible to an XSS attack:\n\n* Web servers\n* Application servers\n* Web application environments\n\n## How to prevent\nThis section describes the top best practices designed to specifically protect your code: \n\n* Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. \n* Convert special characters such as `?`, `&`, `/`, `<`, `>` and spaces to their respective HTML or URL encoded equivalents. \n* Give users the option to disable client-side scripts.\n* Redirect invalid requests.\n* Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.\n* Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.\n* Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.\n\n# Remediation\nUpgrade `cookie` to version 0.7.0 or higher.\n# References\n- [GitHub Commit](https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c)\n- [GitHub PR](https://github.com/jshttp/cookie/pull/167)\n- [Red Hat Bugzilla Bug](https://bugzilla.redhat.com/show_bug.cgi?id=2316549)\n"
|
|
196
|
+
},
|
|
197
|
+
"properties": {
|
|
198
|
+
"tags": [
|
|
199
|
+
"security",
|
|
200
|
+
"CWE-79",
|
|
201
|
+
"yarn"
|
|
202
|
+
],
|
|
203
|
+
"cvssv3_baseScore": 6.3,
|
|
204
|
+
"security-severity": "6.3"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "SNYK-JS-EXPRESS-6474509",
|
|
209
|
+
"shortDescription": {
|
|
210
|
+
"text": "Medium severity - Open Redirect vulnerability in express"
|
|
211
|
+
},
|
|
212
|
+
"fullDescription": {
|
|
213
|
+
"text": "(CVE-2024-29041) express@4.17.1"
|
|
214
|
+
},
|
|
215
|
+
"help": {
|
|
216
|
+
"text": "",
|
|
217
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: express\n* Introduced through: server@1.0.0 and express@4.17.1\n### Detailed paths\n* _Introduced through_: server@1.0.0 › express@4.17.1\n# Overview\n[express](https://github.com/expressjs/express) is a minimalist web framework.\n\nAffected versions of this package are vulnerable to Open Redirect due to the implementation of URL encoding using `encodeurl` before passing it to the `location` header. This can lead to unexpected evaluations of malformed URLs by common redirect allow list implementations in applications, allowing an attacker to bypass a properly implemented allow list and redirect users to malicious sites.\n# Remediation\nUpgrade `express` to version 4.19.2, 5.0.0-beta.3 or higher.\n# References\n- [Github Commit](https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94)\n- [GitHub Commit](https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd)\n- [Github Issue](https://github.com/koajs/koa/issues/1800)\n- [GitHub PR](https://github.com/expressjs/express/pull/5551)\n"
|
|
218
|
+
},
|
|
219
|
+
"properties": {
|
|
220
|
+
"tags": [
|
|
221
|
+
"security",
|
|
222
|
+
"CWE-601",
|
|
223
|
+
"yarn"
|
|
224
|
+
],
|
|
225
|
+
"cvssv3_baseScore": 6.1,
|
|
226
|
+
"security-severity": "6.1"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"id": "SNYK-JS-EXPRESS-7926867",
|
|
231
|
+
"shortDescription": {
|
|
232
|
+
"text": "Medium severity - Cross-site Scripting vulnerability in express"
|
|
233
|
+
},
|
|
234
|
+
"fullDescription": {
|
|
235
|
+
"text": "(CVE-2024-43796) express@4.17.1"
|
|
236
|
+
},
|
|
237
|
+
"help": {
|
|
238
|
+
"text": "",
|
|
239
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: express\n* Introduced through: server@1.0.0 and express@4.17.1\n### Detailed paths\n* _Introduced through_: server@1.0.0 › express@4.17.1\n# Overview\n[express](https://github.com/expressjs/express) is a minimalist web framework.\n\nAffected versions of this package are vulnerable to Cross-site Scripting due to improper handling of user input in the `response.redirect` method. An attacker can execute arbitrary code by passing malicious input to this method.\r\n\r\n\r\n**Note**\r\n\r\nTo exploit this vulnerability, the following conditions are required:\r\n\r\n1) The attacker should be able to control the input to `response.redirect()`\r\n\r\n2) express must not redirect before the template appears\r\n\r\n3) the browser must not complete redirection before:\r\n\r\n4) the user must click on the link in the template\n# Remediation\nUpgrade `express` to version 4.20.0, 5.0.0 or higher.\n# References\n- [GitHub Commit](https://github.com/expressjs/express/commit/54271f69b511fea198471e6ff3400ab805d6b553)\n"
|
|
240
|
+
},
|
|
241
|
+
"properties": {
|
|
242
|
+
"tags": [
|
|
243
|
+
"security",
|
|
244
|
+
"CWE-79",
|
|
245
|
+
"yarn"
|
|
246
|
+
],
|
|
247
|
+
"cvssv3_baseScore": 5.1,
|
|
248
|
+
"security-severity": "5.1"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "SNYK-JS-HOSTEDGITINFO-1088355",
|
|
253
|
+
"shortDescription": {
|
|
254
|
+
"text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in hosted-git-info"
|
|
255
|
+
},
|
|
256
|
+
"fullDescription": {
|
|
257
|
+
"text": "(CVE-2021-23362) hosted-git-info@2.8.2"
|
|
258
|
+
},
|
|
259
|
+
"help": {
|
|
260
|
+
"text": "",
|
|
261
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: hosted-git-info\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › yargs@4.8.1 › read-pkg-up@1.0.1 › read-pkg@1.1.0 › normalize-package-data@2.5.0 › hosted-git-info@2.8.2\n# Overview\n[hosted-git-info](https://www.npmjs.org/package/hosted-git-info) is a Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via regular expression `shortcutMatch ` in the `fromUrl` function in index.js. The affected regular expression exhibits polynomial worst-case time complexity.\r\n\r\n## PoC by Yeting Li\r\n```\r\nvar hostedGitInfo = require(\"hosted-git-info\")\r\nfunction build_attack(n) {\r\n var ret = \"a:\"\r\n for (var i = 0; i < n; i++) {\r\n ret += \"a\"\r\n }\r\n return ret + \"!\";\r\n}\r\n\r\nfor(var i = 1; i <= 5000000; i++) {\r\n if (i % 1000 == 0) {\r\n var time = Date.now();\r\n var attack_str = build_attack(i)\r\n var parsedInfo = hostedGitInfo.fromUrl(attack_str)\r\n var time_cost = Date.now() - time;\r\n console.log(\"attack_str.length: \" + attack_str.length + \": \" + time_cost+\" ms\")\r\n}\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `hosted-git-info` to version 3.0.8, 2.8.9 or higher.\n# References\n- [GitHub Commit](https://github.com/npm/hosted-git-info/commit/bede0dc38e1785e732bf0a48ba6f81a4a908eba3)\n"
|
|
262
|
+
},
|
|
263
|
+
"properties": {
|
|
264
|
+
"tags": [
|
|
265
|
+
"security",
|
|
266
|
+
"CWE-400",
|
|
267
|
+
"yarn"
|
|
268
|
+
],
|
|
269
|
+
"cvssv3_baseScore": 5.3,
|
|
270
|
+
"security-severity": "5.3"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "SNYK-JS-LODASH-1018905",
|
|
275
|
+
"shortDescription": {
|
|
276
|
+
"text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in lodash"
|
|
277
|
+
},
|
|
278
|
+
"fullDescription": {
|
|
279
|
+
"text": "(CVE-2020-28500) lodash@4.17.15"
|
|
280
|
+
},
|
|
281
|
+
"help": {
|
|
282
|
+
"text": "",
|
|
283
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: lodash\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n# Overview\n[lodash](https://www.npmjs.com/package/lodash) is a modern JavaScript utility library delivering modularity, performance, & extras.\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the `toNumber`, `trim` and `trimEnd` functions.\r\n\r\n## POC\r\n```\r\nvar lo = require('lodash');\r\n\r\nfunction build_blank (n) {\r\nvar ret = \"1\"\r\nfor (var i = 0; i < n; i++) {\r\nret += \" \"\r\n}\r\n\r\nreturn ret + \"1\";\r\n}\r\n\r\nvar s = build_blank(50000)\r\nvar time0 = Date.now();\r\nlo.trim(s)\r\nvar time_cost0 = Date.now() - time0;\r\nconsole.log(\"time_cost0: \" + time_cost0)\r\n\r\nvar time1 = Date.now();\r\nlo.toNumber(s)\r\nvar time_cost1 = Date.now() - time1;\r\nconsole.log(\"time_cost1: \" + time_cost1)\r\n\r\nvar time2 = Date.now();\r\nlo.trimEnd(s)\r\nvar time_cost2 = Date.now() - time2;\r\nconsole.log(\"time_cost2: \" + time_cost2)\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `lodash` to version 4.17.21 or higher.\n# References\n- [GitHub Commit](https://github.com/lodash/lodash/commit/c4847ebe7d14540bb28a8b932a9ce1b9ecbfee1a)\n- [GitHub Fix PR](https://github.com/lodash/lodash/pull/5065)\n"
|
|
284
|
+
},
|
|
285
|
+
"properties": {
|
|
286
|
+
"tags": [
|
|
287
|
+
"security",
|
|
288
|
+
"CWE-400",
|
|
289
|
+
"yarn"
|
|
290
|
+
],
|
|
291
|
+
"cvssv3_baseScore": 5.3,
|
|
292
|
+
"security-severity": "5.3"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"id": "SNYK-JS-LODASH-1040724",
|
|
297
|
+
"shortDescription": {
|
|
298
|
+
"text": "High severity - Code Injection vulnerability in lodash"
|
|
299
|
+
},
|
|
300
|
+
"fullDescription": {
|
|
301
|
+
"text": "(CVE-2021-23337) lodash@4.17.15"
|
|
302
|
+
},
|
|
303
|
+
"help": {
|
|
304
|
+
"text": "",
|
|
305
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: lodash\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n# Overview\n[lodash](https://www.npmjs.com/package/lodash) is a modern JavaScript utility library delivering modularity, performance, & extras.\n\nAffected versions of this package are vulnerable to Code Injection via `template`.\r\n\r\n## PoC\r\n```js\r\nvar _ = require('lodash');\r\n\r\n_.template('', { variable: '){console.log(process.env)}; with(obj' })()\r\n```\n# Remediation\nUpgrade `lodash` to version 4.17.21 or higher.\n# References\n- [GitHub Commit](https://github.com/lodash/lodash/commit/3469357cff396a26c363f8c1b5a91dde28ba4b1c)\n- [Vulnerable Code](https://github.com/lodash/lodash/blob/ddfd9b11a0126db2302cb70ec9973b66baec0975/lodash.js#L14851)\n"
|
|
306
|
+
},
|
|
307
|
+
"properties": {
|
|
308
|
+
"tags": [
|
|
309
|
+
"security",
|
|
310
|
+
"CWE-94",
|
|
311
|
+
"yarn"
|
|
312
|
+
],
|
|
313
|
+
"cvssv3_baseScore": 7.2,
|
|
314
|
+
"security-severity": "7.2"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"id": "SNYK-JS-LODASH-567746",
|
|
319
|
+
"shortDescription": {
|
|
320
|
+
"text": "High severity - Prototype Pollution vulnerability in lodash"
|
|
321
|
+
},
|
|
322
|
+
"fullDescription": {
|
|
323
|
+
"text": "(CVE-2020-8203) lodash@4.17.15"
|
|
324
|
+
},
|
|
325
|
+
"help": {
|
|
326
|
+
"text": "",
|
|
327
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: lodash\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n# Overview\n[lodash](https://www.npmjs.com/package/lodash) is a modern JavaScript utility library delivering modularity, performance, & extras.\n\nAffected versions of this package are vulnerable to Prototype Pollution. The function `zipObjectDeep` can be tricked into adding or modifying properties of the Object prototype. These properties will be present on all objects.\n# PoC\n```js\r\nconst _ = require('lodash');\r\n\r\n_.zipObjectDeep(['__proto__.z'],[123]);\r\n\r\nconsole.log(z); // 123\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `lodash` to version 4.17.20 or higher.\n# References\n- [GitHub Commit](https://github.com/lodash/lodash/commit/c84fe82760fb2d3e03a63379b297a1cc1a2fce12)\n- [GitHub PR](https://github.com/lodash/lodash/pull/4759)\n"
|
|
328
|
+
},
|
|
329
|
+
"properties": {
|
|
330
|
+
"tags": [
|
|
331
|
+
"security",
|
|
332
|
+
"CWE-1321",
|
|
333
|
+
"yarn"
|
|
334
|
+
],
|
|
335
|
+
"cvssv3_baseScore": 8.2,
|
|
336
|
+
"security-severity": "8.2"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"id": "SNYK-JS-LODASH-608086",
|
|
341
|
+
"shortDescription": {
|
|
342
|
+
"text": "High severity - Prototype Pollution vulnerability in lodash"
|
|
343
|
+
},
|
|
344
|
+
"fullDescription": {
|
|
345
|
+
"text": "lodash@4.17.15"
|
|
346
|
+
},
|
|
347
|
+
"help": {
|
|
348
|
+
"text": "",
|
|
349
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: lodash\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n# Overview\n[lodash](https://www.npmjs.com/package/lodash) is a modern JavaScript utility library delivering modularity, performance, & extras.\n\nAffected versions of this package are vulnerable to Prototype Pollution via the `set` and `setwith` functions due to improper user input sanitization.\n# PoC\n```js\r\nlod = require('lodash')\r\nlod.set({}, \"__proto__[test2]\", \"456\")\r\nconsole.log(Object.prototype)\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `lodash` to version 4.17.17 or higher.\n# References\n- [HackerOne Report](https://hackerone.com/reports/864701)\n"
|
|
350
|
+
},
|
|
351
|
+
"properties": {
|
|
352
|
+
"tags": [
|
|
353
|
+
"security",
|
|
354
|
+
"CWE-1321",
|
|
355
|
+
"yarn"
|
|
356
|
+
],
|
|
357
|
+
"cvssv3_baseScore": 7.3,
|
|
358
|
+
"security-severity": "7.3"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"id": "SNYK-JS-LODASH-6139239",
|
|
363
|
+
"shortDescription": {
|
|
364
|
+
"text": "High severity - Prototype Pollution vulnerability in lodash"
|
|
365
|
+
},
|
|
366
|
+
"fullDescription": {
|
|
367
|
+
"text": "lodash@4.17.15"
|
|
368
|
+
},
|
|
369
|
+
"help": {
|
|
370
|
+
"text": "",
|
|
371
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: lodash\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › async@2.6.2 › lodash@4.17.15\n# Overview\n[lodash](https://www.npmjs.com/package/lodash) is a modern JavaScript utility library delivering modularity, performance, & extras.\n\nAffected versions of this package are vulnerable to Prototype Pollution through the `zipObjectDeep` function due to improper user input sanitization in the `baseZipObject` function.\n# PoC\n**lodash.zipobjectdeep:**\r\n\r\n```js\r\nconst zipObjectDeep = require(\"lodash.zipobjectdeep\");\r\n\r\nlet emptyObject = {};\r\n\r\n\r\nconsole.log(`[+] Before prototype pollution : ${emptyObject.polluted}`);\r\n//[+] Before prototype pollution : undefined\r\n\r\nzipObjectDeep([\"constructor.prototype.polluted\"], [true]);\r\n//we inject our malicious attributes in the vulnerable function\r\n\r\nconsole.log(`[+] After prototype pollution : ${emptyObject.polluted}`);\r\n//[+] After prototype pollution : true\r\n```\r\n\r\n**lodash:**\r\n\r\n```js\r\nconst test = require(\"lodash\");\r\n\r\nlet emptyObject = {};\r\n\r\n\r\nconsole.log(`[+] Before prototype pollution : ${emptyObject.polluted}`);\r\n//[+] Before prototype pollution : undefined\r\n\r\ntest.zipObjectDeep([\"constructor.prototype.polluted\"], [true]);\r\n//we inject our malicious attributes in the vulnerable function\r\n\r\nconsole.log(`[+] After prototype pollution : ${emptyObject.polluted}`);\r\n//[+] After prototype pollution : true\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `lodash` to version 4.17.17 or higher.\n# References\n- [GitHub Gist](https://gist.github.com/Sampaguitas/a316bced4fdd501146b07997d1d04eb2)\n- [Vulnerable Code](https://github.com/lodash/lodash/blob/aaa111912cb05e6f0f9f23d1eb8a41ccfcf9c2c2/lodash.zipobjectdeep/index.js#L738)\n"
|
|
372
|
+
},
|
|
373
|
+
"properties": {
|
|
374
|
+
"tags": [
|
|
375
|
+
"security",
|
|
376
|
+
"CWE-1321",
|
|
377
|
+
"yarn"
|
|
378
|
+
],
|
|
379
|
+
"cvssv3_baseScore": 7.5,
|
|
380
|
+
"security-severity": "7.5"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"id": "SNYK-JS-MINIMIST-2429795",
|
|
385
|
+
"shortDescription": {
|
|
386
|
+
"text": "Low severity - Prototype Pollution vulnerability in minimist"
|
|
387
|
+
},
|
|
388
|
+
"fullDescription": {
|
|
389
|
+
"text": "(CVE-2021-44906) minimist@0.0.8"
|
|
390
|
+
},
|
|
391
|
+
"help": {
|
|
392
|
+
"text": "",
|
|
393
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: minimist\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mkdirp@0.5.1 › minimist@0.0.8\n# Overview\n[minimist](https://www.npmjs.com/package/minimist) is a parse argument options module.\n\nAffected versions of this package are vulnerable to Prototype Pollution due to a missing handler to `Function.prototype`.\r\n\r\n**Notes:** \r\n\r\n- This vulnerability is a bypass to [CVE-2020-7598](https://security.snyk.io/vuln/SNYK-JS-MINIMIST-559764)\r\n\r\n- The reason for the different CVSS between CVE-2021-44906 to CVE-2020-7598, is that CVE-2020-7598 can pollute objects, while CVE-2021-44906 can pollute only function.\r\n\r\n\r\n# PoC by Snyk\r\n```js\r\nrequire('minimist')('--_.constructor.constructor.prototype.foo bar'.split(' '));\r\nconsole.log((function(){}).foo); // bar\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `minimist` to version 0.2.4, 1.2.6 or higher.\n# References\n- [Fix Commit](https://github.com/minimistjs/minimist/commit/34e20b8461118608703d6485326abbb8e35e1703)\n- [Fix Commit](https://github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d)\n- [Vulnerable Code](https://github.com/minimistjs/minimist/blob/master/index.js#L69)\n"
|
|
394
|
+
},
|
|
395
|
+
"properties": {
|
|
396
|
+
"tags": [
|
|
397
|
+
"security",
|
|
398
|
+
"CWE-1321",
|
|
399
|
+
"yarn"
|
|
400
|
+
],
|
|
401
|
+
"cvssv3_baseScore": 3.7,
|
|
402
|
+
"security-severity": "3.7"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"id": "SNYK-JS-MINIMIST-559764",
|
|
407
|
+
"shortDescription": {
|
|
408
|
+
"text": "Medium severity - Prototype Pollution vulnerability in minimist"
|
|
409
|
+
},
|
|
410
|
+
"fullDescription": {
|
|
411
|
+
"text": "(CVE-2020-7598) minimist@0.0.8"
|
|
412
|
+
},
|
|
413
|
+
"help": {
|
|
414
|
+
"text": "",
|
|
415
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: minimist\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mkdirp@0.5.1 › minimist@0.0.8\n# Overview\n[minimist](https://www.npmjs.com/package/minimist) is a parse argument options module.\n\nAffected versions of this package are vulnerable to Prototype Pollution. The library could be tricked into adding or modifying properties of `Object.prototype` using a `constructor` or `__proto__` payload.\r\n\r\n# PoC by Snyk\r\n```\r\nrequire('minimist')('--__proto__.injected0 value0'.split(' '));\r\nconsole.log(({}).injected0 === 'value0'); // true\r\n\r\nrequire('minimist')('--constructor.prototype.injected1 value1'.split(' '));\r\nconsole.log(({}).injected1 === 'value1'); // true\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `minimist` to version 0.2.1, 1.2.3 or higher.\n# References\n- [Command Injection PoC](https://gist.github.com/Kirill89/47feb345b09bf081317f08dd43403a8a)\n- [GitHub Fix Commit #1](https://github.com/substack/minimist/commit/63e7ed05aa4b1889ec2f3b196426db4500cbda94)\n- [GitHub Fix Commit #2](https://github.com/substack/minimist/commit/38a4d1caead72ef99e824bb420a2528eec03d9ab)\n- [Snyk Research Blog](https://snyk.io/blog/prototype-pollution-minimist/)\n"
|
|
416
|
+
},
|
|
417
|
+
"properties": {
|
|
418
|
+
"tags": [
|
|
419
|
+
"security",
|
|
420
|
+
"CWE-1321",
|
|
421
|
+
"yarn"
|
|
422
|
+
],
|
|
423
|
+
"cvssv3_baseScore": 5.6,
|
|
424
|
+
"security-severity": "5.6"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"id": "SNYK-JS-MONGOOSE-1086688",
|
|
429
|
+
"shortDescription": {
|
|
430
|
+
"text": "Medium severity - Prototype Pollution vulnerability in mongoose"
|
|
431
|
+
},
|
|
432
|
+
"fullDescription": {
|
|
433
|
+
"text": "mongoose@5.6.9"
|
|
434
|
+
},
|
|
435
|
+
"help": {
|
|
436
|
+
"text": "",
|
|
437
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mongoose\n* Introduced through: server@1.0.0 and mongoose@5.6.9\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9\n# Overview\n[mongoose](https://www.npmjs.com/package/mongoose) is a Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Prototype Pollution. The `mongoose.Schema()` function is subject to prototype pollution due to the recursively calling of `Schema.prototype.add()` function to add new items into the schema object. This vulnerability allows modification of the Object prototype.\r\n\r\n\r\n## PoC\r\n```\r\nmongoose = require('mongoose');\r\nmongoose.version; //'5.12.0'\r\nvar malicious_payload = '{\"__proto__\":{\"polluted\":\"HACKED\"}}';\r\nconsole.log('Before:', {}.polluted); // undefined\r\nmongoose.Schema(JSON.parse(malicious_payload));\r\nconsole.log('After:', {}.polluted); // HACKED\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `mongoose` to version 5.12.2 or higher.\n# References\n- [GitHub Commit](https://github.com/Automattic/mongoose/commit/3ed44ffa13737be9fc0d709980da9c3c552d54e7)\n- [GitHub Issue](https://github.com/Automattic/mongoose/issues/10035)\n"
|
|
438
|
+
},
|
|
439
|
+
"properties": {
|
|
440
|
+
"tags": [
|
|
441
|
+
"security",
|
|
442
|
+
"CWE-1321",
|
|
443
|
+
"yarn"
|
|
444
|
+
],
|
|
445
|
+
"cvssv3_baseScore": 5.6,
|
|
446
|
+
"security-severity": "5.6"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"id": "SNYK-JS-MONGOOSE-2961688",
|
|
451
|
+
"shortDescription": {
|
|
452
|
+
"text": "High severity - Prototype Pollution vulnerability in mongoose"
|
|
453
|
+
},
|
|
454
|
+
"fullDescription": {
|
|
455
|
+
"text": "(CVE-2022-2564) mongoose@5.6.9"
|
|
456
|
+
},
|
|
457
|
+
"help": {
|
|
458
|
+
"text": "",
|
|
459
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mongoose\n* Introduced through: server@1.0.0 and mongoose@5.6.9\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9\n# Overview\n[mongoose](https://www.npmjs.com/package/mongoose) is a Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Prototype Pollution in the `Schema.path()` function.\r\n\r\n**Note:**\r\nCVE-2022-24304 is a duplicate of CVE-2022-2564.\r\n\r\n\r\n# PoC:\r\n```js\r\nconst mongoose = require('mongoose');\r\nconst schema = new mongoose.Schema();\r\n\r\nmalicious_payload = '__proto__.toString'\r\n\r\nschema.path(malicious_payload, [String])\r\n\r\nx = {}\r\nconsole.log(x.toString())\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `mongoose` to version 5.13.15, 6.4.6 or higher.\n# References\n- [Github Commit](https://github.com/Automattic/mongoose/commit/6a197316564742c0422309e1b5fecfa4faec126e)\n- [GitHub Commit](https://github.com/Automattic/mongoose/commit/a45cfb6b0ce0067ae9794cfa80f7917e1fb3c6f8)\n- [GitHub Issue](https://github.com/Automattic/mongoose/issues/12085)\n"
|
|
460
|
+
},
|
|
461
|
+
"properties": {
|
|
462
|
+
"tags": [
|
|
463
|
+
"security",
|
|
464
|
+
"CWE-1321",
|
|
465
|
+
"yarn"
|
|
466
|
+
],
|
|
467
|
+
"cvssv3_baseScore": 7,
|
|
468
|
+
"security-severity": "7"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"id": "SNYK-JS-MONGOOSE-472486",
|
|
473
|
+
"shortDescription": {
|
|
474
|
+
"text": "Medium severity - Information Exposure vulnerability in mongoose"
|
|
475
|
+
},
|
|
476
|
+
"fullDescription": {
|
|
477
|
+
"text": "(CVE-2019-17426) mongoose@5.6.9"
|
|
478
|
+
},
|
|
479
|
+
"help": {
|
|
480
|
+
"text": "",
|
|
481
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mongoose\n* Introduced through: server@1.0.0 and mongoose@5.6.9\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9\n# Overview\n[mongoose](https://www.npmjs.com/package/mongoose) is a Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Information Exposure. Any query object with a `_bsontype` attribute is ignored, allowing attackers to bypass access control.\n# Remediation\nUpgrade `mongoose` to version 4.13.21, 5.7.5 or higher.\n# References\n- [GitHub Commit](https://github.com/Automattic/mongoose/commit/f3eca5b94d822225c04e96cbeed9f095afb3c31c)\n- [GitHub Issue](https://github.com/Automattic/mongoose/issues/8222)\n"
|
|
482
|
+
},
|
|
483
|
+
"properties": {
|
|
484
|
+
"tags": [
|
|
485
|
+
"security",
|
|
486
|
+
"CWE-200",
|
|
487
|
+
"yarn"
|
|
488
|
+
],
|
|
489
|
+
"cvssv3_baseScore": 5.9,
|
|
490
|
+
"security-severity": "5.9"
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"id": "SNYK-JS-MONGOOSE-5777721",
|
|
495
|
+
"shortDescription": {
|
|
496
|
+
"text": "High severity - Prototype Pollution vulnerability in mongoose"
|
|
497
|
+
},
|
|
498
|
+
"fullDescription": {
|
|
499
|
+
"text": "(CVE-2023-3696) mongoose@5.6.9"
|
|
500
|
+
},
|
|
501
|
+
"help": {
|
|
502
|
+
"text": "",
|
|
503
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mongoose\n* Introduced through: server@1.0.0 and mongoose@5.6.9\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9\n# Overview\n[mongoose](https://www.npmjs.com/package/mongoose) is a Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Prototype Pollution in `document.js`, via update functions such as `findByIdAndUpdate()`. This allows attackers to achieve remote code execution.\r\n\r\n**Note:** Only applications using Express and EJS are vulnerable.\n# PoC\n```js\r\n\r\nimport { connect, model, Schema } from 'mongoose';\r\n\r\nawait connect('mongodb://127.0.0.1:27017/exploit');\r\n\r\nconst Example = model('Example', new Schema({ hello: String }));\r\n\r\nconst example = await new Example({ hello: 'world!' }).save();\r\nawait Example.findByIdAndUpdate(example._id, {\r\n $rename: {\r\n hello: '__proto__.polluted'\r\n }\r\n});\r\n\r\n// this is what causes the pollution\r\nawait Example.find();\r\n\r\nconst test = {};\r\nconsole.log(test.polluted); // world!\r\nconsole.log(Object.prototype); // [Object: null prototype] { polluted: 'world!' }\r\n\r\nprocess.exit();\r\n\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `mongoose` to version 5.13.20, 6.11.3, 7.3.4 or higher.\n# References\n- [GitHub Commit](https://github.com/automattic/mongoose/commit/305ce4ff789261df7e3f6e72363d0703e025f80d)\n- [GitHub Commit](https://github.com/Automattic/mongoose/commit/f1efabf350522257364aa5c2cb36e441cf08f1a2)\n"
|
|
504
|
+
},
|
|
505
|
+
"properties": {
|
|
506
|
+
"tags": [
|
|
507
|
+
"security",
|
|
508
|
+
"CWE-1321",
|
|
509
|
+
"yarn"
|
|
510
|
+
],
|
|
511
|
+
"cvssv3_baseScore": 8.1,
|
|
512
|
+
"security-severity": "8.1"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"id": "SNYK-JS-MONGOOSE-8446504",
|
|
517
|
+
"shortDescription": {
|
|
518
|
+
"text": "High severity - Improper Neutralization of Special Elements in Data Query Logic vulnerability in mongoose"
|
|
519
|
+
},
|
|
520
|
+
"fullDescription": {
|
|
521
|
+
"text": "(CVE-2024-53900) mongoose@5.6.9"
|
|
522
|
+
},
|
|
523
|
+
"help": {
|
|
524
|
+
"text": "",
|
|
525
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mongoose\n* Introduced through: server@1.0.0 and mongoose@5.6.9\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9\n# Overview\n[mongoose](https://www.npmjs.com/package/mongoose) is a Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Improper Neutralization of Special Elements in Data Query Logic due to the improper handling of `$where` in match queries. An attacker can manipulate search queries to inject malicious code.\n# Remediation\nUpgrade `mongoose` to version 6.13.5, 7.8.3, 8.8.3 or higher.\n# References\n- [GitHub Commit](https://github.com/Automattic/mongoose/commit/33679bcf8ca43d74e3e8ecd4cc224826772d805b)\n- [GitHub Commit](https://github.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156)\n"
|
|
526
|
+
},
|
|
527
|
+
"properties": {
|
|
528
|
+
"tags": [
|
|
529
|
+
"security",
|
|
530
|
+
"CWE-943",
|
|
531
|
+
"yarn"
|
|
532
|
+
],
|
|
533
|
+
"cvssv3_baseScore": 8.7,
|
|
534
|
+
"security-severity": "8.7"
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"id": "SNYK-JS-MONGOOSE-8623536",
|
|
539
|
+
"shortDescription": {
|
|
540
|
+
"text": "High severity - Improper Neutralization of Special Elements in Data Query Logic vulnerability in mongoose"
|
|
541
|
+
},
|
|
542
|
+
"fullDescription": {
|
|
543
|
+
"text": "(CVE-2025-23061) mongoose@5.6.9"
|
|
544
|
+
},
|
|
545
|
+
"help": {
|
|
546
|
+
"text": "",
|
|
547
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mongoose\n* Introduced through: server@1.0.0 and mongoose@5.6.9\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9\n# Overview\n[mongoose](https://www.npmjs.com/package/mongoose) is a Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.\n\nAffected versions of this package are vulnerable to Improper Neutralization of Special Elements in Data Query Logic due to the improper use of a `$where` filter in conjunction with the `populate()` match. An attacker can manipulate search queries to retrieve or alter information without proper authorization by injecting malicious input into the query.\r\n\r\n**Note:**\r\nThis vulnerability derives from an incomplete fix of [CVE-2024-53900](https://security.snyk.io/vuln/SNYK-JS-MONGOOSE-8446504)\n# Remediation\nUpgrade `mongoose` to version 6.13.6, 7.8.4, 8.9.5 or higher.\n# References\n- [GitHub Commit](https://github.com/Automattic/mongoose/commit/64a9f9706f2428c49e0cfb8e223065acc645f7bc)\n- [GitHub Release](https://github.com/Automattic/mongoose/releases/tag/6.13.6)\n- [GitHub Release](https://github.com/Automattic/mongoose/releases/tag/7.8.4)\n- [GitHub Release](https://github.com/Automattic/mongoose/releases/tag/8.9.5)\n"
|
|
548
|
+
},
|
|
549
|
+
"properties": {
|
|
550
|
+
"tags": [
|
|
551
|
+
"security",
|
|
552
|
+
"CWE-943",
|
|
553
|
+
"yarn"
|
|
554
|
+
],
|
|
555
|
+
"cvssv3_baseScore": 8.7,
|
|
556
|
+
"security-severity": "8.7"
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"id": "SNYK-JS-MPATH-1577289",
|
|
561
|
+
"shortDescription": {
|
|
562
|
+
"text": "Medium severity - Prototype Pollution vulnerability in mpath"
|
|
563
|
+
},
|
|
564
|
+
"fullDescription": {
|
|
565
|
+
"text": "(CVE-2021-23438) mpath@0.6.0"
|
|
566
|
+
},
|
|
567
|
+
"help": {
|
|
568
|
+
"text": "",
|
|
569
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mpath\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mpath@0.6.0\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mpath@0.6.0\n# Overview\n[mpath](https://www.npmjs.com/package/mpath) is a package that gets/sets javascript object values using MongoDB-like path notation.\n\nAffected versions of this package are vulnerable to Prototype Pollution. A type confusion vulnerability can lead to a bypass of CVE-2018-16490. In particular, the condition `ignoreProperties.indexOf(parts[i]) !== -1` returns `-1` if `parts[i]` is `['__proto__']`. This is because the method that has been called if the input is an array is `Array.prototype.indexOf()` and not `String.prototype.indexOf()`. They behave differently depending on the type of the input.\r\n\r\n## PoC\r\n```\r\nconst mpath = require('mpath');\r\n// mpath.set(['__proto__', 'polluted'], 'yes', {});\r\n// console.log(polluted); // ReferenceError: polluted is not defined\r\n\r\nmpath.set([['__proto__'], 'polluted'], 'yes', {});\r\nconsole.log(polluted); // yes\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `mpath` to version 0.8.4 or higher.\n# References\n- [GitHub Commit](https://github.com/aheckmann/mpath/commit/89402d2880d4ea3518480a8c9847c541f2d824fc)\n- [Snyk Blog](https://snyk.io/blog/remediate-javascript-type-confusion-bypassed-input-validation/)\n"
|
|
570
|
+
},
|
|
571
|
+
"properties": {
|
|
572
|
+
"tags": [
|
|
573
|
+
"security",
|
|
574
|
+
"CWE-1321",
|
|
575
|
+
"yarn"
|
|
576
|
+
],
|
|
577
|
+
"cvssv3_baseScore": 5.6,
|
|
578
|
+
"security-severity": "5.6"
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"id": "SNYK-JS-MQUERY-1050858",
|
|
583
|
+
"shortDescription": {
|
|
584
|
+
"text": "High severity - Prototype Pollution vulnerability in mquery"
|
|
585
|
+
},
|
|
586
|
+
"fullDescription": {
|
|
587
|
+
"text": "(CVE-2020-35149) mquery@3.2.1"
|
|
588
|
+
},
|
|
589
|
+
"help": {
|
|
590
|
+
"text": "",
|
|
591
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mquery\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mquery@3.2.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mquery@3.2.1\n# Overview\n[mquery](https://www.npmjs.org/package/mquery) is an Expressive query building for MongoDB\n\nAffected versions of this package are vulnerable to Prototype Pollution via the `merge` function within `lib/utils.js`. Depending on if user input is provided, an attacker can overwrite and pollute the object prototype of a program. \r\n\r\n\r\n## PoC\r\n```\r\n require('./env').getCollection(function(err, collection) {\r\n assert.ifError(err);\r\n col = collection;\r\n done();\r\n });\r\n var payload = JSON.parse('{\"__proto__\": {\"polluted\": \"vulnerable\"}}');\r\n var m = mquery(payload);\r\n console.log({}.polluted);\r\n// The empty object {} will have a property called polluted which will print vulnerable\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `mquery` to version 3.2.3 or higher.\n# References\n- [mquery GitHub Commit](https://github.com/aheckmann/mquery/commit/792e69fd0a7281a0300be5cade5a6d7c1d468ad4)\n- [rxdb GitHub Commit](https://github.com/pubkey/rxdb/commit/b72ea7789ed61649ed05926bd6bac6d2bb6662d6)\n"
|
|
592
|
+
},
|
|
593
|
+
"properties": {
|
|
594
|
+
"tags": [
|
|
595
|
+
"security",
|
|
596
|
+
"CWE-1321",
|
|
597
|
+
"yarn"
|
|
598
|
+
],
|
|
599
|
+
"cvssv3_baseScore": 7.3,
|
|
600
|
+
"security-severity": "7.3"
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"id": "SNYK-JS-MQUERY-1089718",
|
|
605
|
+
"shortDescription": {
|
|
606
|
+
"text": "High severity - Prototype Pollution vulnerability in mquery"
|
|
607
|
+
},
|
|
608
|
+
"fullDescription": {
|
|
609
|
+
"text": "mquery@3.2.1"
|
|
610
|
+
},
|
|
611
|
+
"help": {
|
|
612
|
+
"text": "",
|
|
613
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: mquery\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mquery@3.2.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mquery@3.2.1\n# Overview\n[mquery](https://www.npmjs.org/package/mquery) is an Expressive query building for MongoDB\n\nAffected versions of this package are vulnerable to Prototype Pollution via the `mergeClone()` function.\r\n\r\n## PoC by zhou, peng\r\n```\r\nmquery = require('mquery');\r\nvar malicious_payload = '{\"__proto__\":{\"polluted\":\"HACKED\"}}';\r\nconsole.log('Before:', {}.polluted); // undefined\r\nmquery.utils.mergeClone({}, JSON.parse(malicious_payload));\r\nconsole.log('After:', {}.polluted); // HACKED\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `mquery` to version 3.2.5 or higher.\n# References\n- [GitHub Commit](https://github.com/aheckmann/mquery/commit/158f059e058579d2d08c2f1380689f5f69336778)\n- [GitHub PR](https://github.com/aheckmann/mquery/pull/121)\n"
|
|
614
|
+
},
|
|
615
|
+
"properties": {
|
|
616
|
+
"tags": [
|
|
617
|
+
"security",
|
|
618
|
+
"CWE-1321",
|
|
619
|
+
"yarn"
|
|
620
|
+
],
|
|
621
|
+
"cvssv3_baseScore": 7.5,
|
|
622
|
+
"security-severity": "7.5"
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"id": "SNYK-JS-PASSPORT-2840631",
|
|
627
|
+
"shortDescription": {
|
|
628
|
+
"text": "Medium severity - Session Fixation vulnerability in passport"
|
|
629
|
+
},
|
|
630
|
+
"fullDescription": {
|
|
631
|
+
"text": "(CVE-2022-25896) passport@0.4.0"
|
|
632
|
+
},
|
|
633
|
+
"help": {
|
|
634
|
+
"text": "",
|
|
635
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: passport\n* Introduced through: server@1.0.0 and passport@0.4.0\n### Detailed paths\n* _Introduced through_: server@1.0.0 › passport@0.4.0\n# Overview\n[passport](https://www.npmjs.org/package/passport) is a Simple, unobtrusive authentication for Node.js.\n\nAffected versions of this package are vulnerable to Session Fixation. When a user logs in or logs out, the session is regenerated instead of being closed.\n# Remediation\nUpgrade `passport` to version 0.6.0 or higher.\n# References\n- [GitHub Commit](https://github.com/jaredhanson/passport/commit/7e9b9cf4d7be02428e963fc729496a45baeea608)\n- [GitHub PR](https://github.com/jaredhanson/passport/pull/900)\n"
|
|
636
|
+
},
|
|
637
|
+
"properties": {
|
|
638
|
+
"tags": [
|
|
639
|
+
"security",
|
|
640
|
+
"CWE-384",
|
|
641
|
+
"yarn"
|
|
642
|
+
],
|
|
643
|
+
"cvssv3_baseScore": 4.8,
|
|
644
|
+
"security-severity": "4.8"
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"id": "SNYK-JS-PATHPARSE-1077067",
|
|
649
|
+
"shortDescription": {
|
|
650
|
+
"text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in path-parse"
|
|
651
|
+
},
|
|
652
|
+
"fullDescription": {
|
|
653
|
+
"text": "(CVE-2021-23343) path-parse@1.0.6"
|
|
654
|
+
},
|
|
655
|
+
"help": {
|
|
656
|
+
"text": "",
|
|
657
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: path-parse\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › yargs@4.8.1 › read-pkg-up@1.0.1 › read-pkg@1.1.0 › normalize-package-data@2.5.0 › resolve@1.12.0 › path-parse@1.0.6\n# Overview\n[path-parse](https://www.npmjs.org/package/path-parse) is a Node.js path.parse() ponyfill\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via `splitDeviceRe`, `splitTailRe`, and `splitPathRe` regular expressions. ReDoS exhibits polynomial worst-case time complexity.\r\n\r\n## PoC\r\n```\r\nvar pathParse = require('path-parse');\r\nfunction build_attack(n) {\r\n var ret = \"\"\r\n for (var i = 0; i < n; i++) {\r\n ret += \"/\"\r\n }\r\n return ret + \"◎\";\r\n}\r\n\r\nfor(var i = 1; i <= 5000000; i++) {\r\n if (i % 10000 == 0) {\r\n var time = Date.now();\r\n var attack_str = build_attack(i)\r\n pathParse(attack_str);\r\n var time_cost = Date.now() - time;\r\n console.log(\"attack_str.length: \" + attack_str.length + \": \" + time_cost+\" ms\")\r\n }\r\n}\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `path-parse` to version 1.0.7 or higher.\n# References\n- [GitHub Issue 1](https://github.com/jbgutierrez/path-parse/issues/8)\n- [GitHub PR](https://github.com/jbgutierrez/path-parse/pull/10)\n"
|
|
658
|
+
},
|
|
659
|
+
"properties": {
|
|
660
|
+
"tags": [
|
|
661
|
+
"security",
|
|
662
|
+
"CWE-400",
|
|
663
|
+
"yarn"
|
|
664
|
+
],
|
|
665
|
+
"cvssv3_baseScore": 5.3,
|
|
666
|
+
"security-severity": "5.3"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"id": "SNYK-JS-PATHTOREGEXP-7925106",
|
|
671
|
+
"shortDescription": {
|
|
672
|
+
"text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in path-to-regexp"
|
|
673
|
+
},
|
|
674
|
+
"fullDescription": {
|
|
675
|
+
"text": "(CVE-2024-45296) path-to-regexp@0.1.7"
|
|
676
|
+
},
|
|
677
|
+
"help": {
|
|
678
|
+
"text": "",
|
|
679
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: path-to-regexp\n* Introduced through: server@1.0.0, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › express@4.17.1 › path-to-regexp@0.1.7\n# Overview\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when including multiple regular expression parameters in a single segment, which will produce the regular expression `/^\\/([^\\/]+?)-([^\\/]+?)\\/?$/`, if two parameters within a single segment are separated by a character other than a `/` or `.`. Poor performance will block the event loop and can lead to a DoS.\r\n\r\n**Note:**\r\nWhile the 8.0.0 release has completely eliminated the vulnerable functionality, prior versions that have received the patch to mitigate backtracking may still be vulnerable if custom regular expressions are used. So it is strongly recommended for regular expression input to be controlled to avoid malicious performance degradation in those versions. This behavior is enforced as of version 7.1.0 via the `strict` option, which returns an error if a dangerous regular expression is detected.\r\n\r\n# Workaround\r\nThis vulnerability can be avoided by using a custom regular expression for parameters after the first in a segment, which excludes `-` and `/`.\n# PoC\n```js\r\n/a${'-a'.repeat(8_000)}/a\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `path-to-regexp` to version 0.1.10, 1.9.0, 3.3.0, 6.3.0, 8.0.0 or higher.\n# References\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/29b96b4a1de52824e1ca0f49a701183cc4ed476f)\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/60f2121e9b66b7b622cc01080df0aabda9eedee6)\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/f73ec6c86b06f544b977119c2b62a16de480a6a9)\n- [Strict Mode Release Note](https://github.com/pillarjs/path-to-regexp/releases/tag/v7.1.0)\n- [Vulnerability Write-up](https://blakeembrey.com/posts/2024-09-web-redos/)\n"
|
|
680
|
+
},
|
|
681
|
+
"properties": {
|
|
682
|
+
"tags": [
|
|
683
|
+
"security",
|
|
684
|
+
"CWE-1333",
|
|
685
|
+
"yarn"
|
|
686
|
+
],
|
|
687
|
+
"cvssv3_baseScore": 6.9,
|
|
688
|
+
"security-severity": "6.9"
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"id": "SNYK-JS-PATHTOREGEXP-8482416",
|
|
693
|
+
"shortDescription": {
|
|
694
|
+
"text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in path-to-regexp"
|
|
695
|
+
},
|
|
696
|
+
"fullDescription": {
|
|
697
|
+
"text": "(CVE-2024-52798) path-to-regexp@0.1.7"
|
|
698
|
+
},
|
|
699
|
+
"help": {
|
|
700
|
+
"text": "",
|
|
701
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: path-to-regexp\n* Introduced through: server@1.0.0, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › express@4.17.1 › path-to-regexp@0.1.7\n# Overview\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when including multiple regular expression parameters in a single segment, when the separator is not `.` (e.g. no `/:a-:b`). Poor performance will block the event loop and can lead to a DoS.\r\n\r\n**Note:**\r\n\r\nThis issue is caused due to an incomplete fix for [CVE-2024-45296](https://security.snyk.io/vuln/SNYK-JS-PATHTOREGEXP-7925106).\r\n\r\n# Workarounds\r\n\r\nThis can be mitigated by avoiding using two parameters within a single path segment, when the separator is not `.` (e.g. no `/:a-:b`). Alternatively, the regex used for both parameters can be defined to ensure they do not overlap to allow backtracking.\n# PoC\n```js\r\n/a${'-a'.repeat(8_000)}/a\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `path-to-regexp` to version 0.1.12 or higher.\n# References\n- [Blog Post](https://blakeembrey.com/posts/2024-09-web-redos)\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/f01c26a013b1889f0c217c643964513acf17f6a4)\n"
|
|
702
|
+
},
|
|
703
|
+
"properties": {
|
|
704
|
+
"tags": [
|
|
705
|
+
"security",
|
|
706
|
+
"CWE-1333",
|
|
707
|
+
"yarn"
|
|
708
|
+
],
|
|
709
|
+
"cvssv3_baseScore": 6.9,
|
|
710
|
+
"security-severity": "6.9"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"id": "SNYK-JS-QS-3153490",
|
|
715
|
+
"shortDescription": {
|
|
716
|
+
"text": "High severity - Prototype Poisoning vulnerability in qs"
|
|
717
|
+
},
|
|
718
|
+
"fullDescription": {
|
|
719
|
+
"text": "(CVE-2022-24999) qs@6.7.0"
|
|
720
|
+
},
|
|
721
|
+
"help": {
|
|
722
|
+
"text": "",
|
|
723
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: qs\n* Introduced through: server@1.0.0, body-parser@1.19.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › body-parser@1.19.0 › qs@6.7.0\n* _Introduced through_: server@1.0.0 › express@4.17.1 › qs@6.7.0\n* _Introduced through_: server@1.0.0 › express@4.17.1 › body-parser@1.19.0 › qs@6.7.0\n# Overview\n[qs](https://www.npmjs.com/package/qs) is a querystring parser that supports nesting and arrays, with a depth limit.\n\nAffected versions of this package are vulnerable to Prototype Poisoning which allows attackers to cause a Node process to hang, processing an Array object whose prototype has been replaced by one with an excessive length value.\r\n\r\n**Note:** In many typical Express use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as `a[__proto__]=b&a[__proto__]&a[length]=100000000`.\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.\n\nUnlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.\n\nOne popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.\n\nWhen it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.\n\nTwo common types of DoS vulnerabilities:\n\n* High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, [commons-fileupload:commons-fileupload](https://security.snyk.io/vuln/SNYK-JAVA-COMMONSFILEUPLOAD-30082).\n\n* Crash - An attacker sending crafted requests that could cause the system to crash. For Example, [npm `ws` package](https://snyk.io/vuln/npm:ws:20171108)\n\n# Remediation\nUpgrade `qs` to version 6.2.4, 6.3.3, 6.4.1, 6.5.3, 6.6.1, 6.7.3, 6.8.3, 6.9.7, 6.10.3 or higher.\n# References\n- [GitHub PR](https://github.com/ljharb/qs/pull/428)\n- [RedHat Bugzilla Bug](https://bugzilla.redhat.com/show_bug.cgi?id=2150323)\n- [Researcher Advisory](https://github.com/n8tz/CVE-2022-24999)\n"
|
|
724
|
+
},
|
|
725
|
+
"properties": {
|
|
726
|
+
"tags": [
|
|
727
|
+
"security",
|
|
728
|
+
"CWE-1321",
|
|
729
|
+
"yarn"
|
|
730
|
+
],
|
|
731
|
+
"cvssv3_baseScore": 7.5,
|
|
732
|
+
"security-severity": "7.5"
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"id": "SNYK-JS-REDIS-1255645",
|
|
737
|
+
"shortDescription": {
|
|
738
|
+
"text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in redis"
|
|
739
|
+
},
|
|
740
|
+
"fullDescription": {
|
|
741
|
+
"text": "(CVE-2021-29469) redis@2.8.0"
|
|
742
|
+
},
|
|
743
|
+
"help": {
|
|
744
|
+
"text": "",
|
|
745
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: redis\n* Introduced through: server@1.0.0 and redis@2.8.0\n### Detailed paths\n* _Introduced through_: server@1.0.0 › redis@2.8.0\n# Overview\n[redis](https://www.npmjs.org/package/redis) is an A high performance Redis client.\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). When a client is in monitoring mode, `monitor_regex`, which is used to detected monitor messages` could cause exponential backtracking on some strings, leading to denial of service.\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `redis` to version 3.1.1 or higher.\n# References\n- [GitHub Commit](https://github.com/NodeRedis/node-redis/commit/2d11b6dc9b9774464a91fb4b448bad8bf699629e)\n- [GitHub Release](https://github.com/NodeRedis/node-redis/releases/tag/v3.1.1)\n"
|
|
746
|
+
},
|
|
747
|
+
"properties": {
|
|
748
|
+
"tags": [
|
|
749
|
+
"security",
|
|
750
|
+
"CWE-400",
|
|
751
|
+
"yarn"
|
|
752
|
+
],
|
|
753
|
+
"cvssv3_baseScore": 5.3,
|
|
754
|
+
"security-severity": "5.3"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"id": "SNYK-JS-SEMVER-3247795",
|
|
759
|
+
"shortDescription": {
|
|
760
|
+
"text": "High severity - Regular Expression Denial of Service (ReDoS) vulnerability in semver"
|
|
761
|
+
},
|
|
762
|
+
"fullDescription": {
|
|
763
|
+
"text": "(CVE-2022-25883) semver@5.7.0"
|
|
764
|
+
},
|
|
765
|
+
"help": {
|
|
766
|
+
"text": "",
|
|
767
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: semver\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › require_optional@1.0.1 › semver@5.7.0\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › require_optional@1.0.1 › semver@5.7.0\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › yargs@4.8.1 › read-pkg-up@1.0.1 › read-pkg@1.1.0 › normalize-package-data@2.5.0 › semver@5.7.0\n# Overview\n[semver](https://github.com/npm/node-semver) is a semantic version parser used by npm.\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the function `new Range`, when untrusted user data is provided as a range.\r\n\r\n\r\n# PoC\r\n\r\n```js\r\n\r\nconst semver = require('semver')\r\nconst lengths_2 = [2000, 4000, 8000, 16000, 32000, 64000, 128000]\r\n\r\nconsole.log(\"n[+] Valid range - Test payloads\")\r\nfor (let i = 0; i =1.2.3' + ' '.repeat(lengths_2[i]) + '<1.3.0';\r\nconst start = Date.now()\r\nsemver.validRange(value)\r\n// semver.minVersion(value)\r\n// semver.maxSatisfying([\"1.2.3\"], value)\r\n// semver.minSatisfying([\"1.2.3\"], value)\r\n// new semver.Range(value, {})\r\n\r\nconst end = Date.now();\r\nconsole.log('length=%d, time=%d ms', value.length, end - start);\r\n}\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `semver` to version 5.7.2, 6.3.1, 7.5.2 or higher.\n# References\n- [GitHub Commit](https://github.com/npm/node-semver/commit/2f8fd41487acf380194579ecb6f8b1bbfe116be0)\n- [GitHub Commit](https://github.com/npm/node-semver/commit/717534ee353682f3bcf33e60a8af4292626d4441)\n- [GitHub Commit](https://github.com/npm/node-semver/commit/928e56d21150da0413a3333a3148b20e741a920c)\n- [GitHub PR](https://github.com/npm/node-semver/pull/564)\n- [Vulnerable Code](https://github.com/npm/node-semver/blob/main/classes/range.js#L97-L104)\n- [Vulnerable Code](https://github.com/npm/node-semver/blob/main/internal/re.js#L138)\n- [Vulnerable Code](https://github.com/npm/node-semver/blob/main/internal/re.js#L160)\n"
|
|
768
|
+
},
|
|
769
|
+
"properties": {
|
|
770
|
+
"tags": [
|
|
771
|
+
"security",
|
|
772
|
+
"CWE-1333",
|
|
773
|
+
"yarn"
|
|
774
|
+
],
|
|
775
|
+
"cvssv3_baseScore": 7.5,
|
|
776
|
+
"security-severity": "7.5"
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"id": "SNYK-JS-SEND-7926862",
|
|
781
|
+
"shortDescription": {
|
|
782
|
+
"text": "Low severity - Cross-site Scripting vulnerability in send"
|
|
783
|
+
},
|
|
784
|
+
"fullDescription": {
|
|
785
|
+
"text": "(CVE-2024-43799) send@0.17.1"
|
|
786
|
+
},
|
|
787
|
+
"help": {
|
|
788
|
+
"text": "",
|
|
789
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: send\n* Introduced through: server@1.0.0, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › express@4.17.1 › send@0.17.1\n* _Introduced through_: server@1.0.0 › express@4.17.1 › serve-static@1.14.1 › send@0.17.1\n# Overview\n[send](https://github.com/pillarjs/send) is a Better streaming static file server with Range and conditional-GET support\n\nAffected versions of this package are vulnerable to Cross-site Scripting due to improper user input sanitization passed to the `SendStream.redirect()` function, which executes untrusted code. An attacker can execute arbitrary code by manipulating the input parameters to this method.\r\n\r\n**Note:**\r\n\r\nExploiting this vulnerability requires the following:\r\n\r\n1) The attacker needs to control the input to `response.redirect()`\r\n\r\n2) Express MUST NOT redirect before the template appears\r\n\r\n3) The browser MUST NOT complete redirection before\r\n\r\n4) The user MUST click on the link in the template\n# Details\n\nA cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.\n\nThis is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.\n\nInjecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.\n\nEscaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, `<` can be coded as `<`; and `>` can be coded as `>`; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses `<` and `>` as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.\n \nThe most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. \n\n## Types of attacks\nThere are a few methods by which XSS can be manipulated:\n\n|Type|Origin|Description|\n|--|--|--|\n|**Stored**|Server|The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.|\n|**Reflected**|Server|The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.| \n|**DOM-based**|Client|The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.|\n|**Mutated**| |The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.|\n\n## Affected environments\nThe following environments are susceptible to an XSS attack:\n\n* Web servers\n* Application servers\n* Web application environments\n\n## How to prevent\nThis section describes the top best practices designed to specifically protect your code: \n\n* Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. \n* Convert special characters such as `?`, `&`, `/`, `<`, `>` and spaces to their respective HTML or URL encoded equivalents. \n* Give users the option to disable client-side scripts.\n* Redirect invalid requests.\n* Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.\n* Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.\n* Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.\n\n# Remediation\nUpgrade `send` to version 0.19.0, 1.1.0 or higher.\n# References\n- [GitHub Commit](https://github.com/pillarjs/send/commit/ae4f2989491b392ae2ef3b0015a019770ae65d35)\n"
|
|
790
|
+
},
|
|
791
|
+
"properties": {
|
|
792
|
+
"tags": [
|
|
793
|
+
"security",
|
|
794
|
+
"CWE-79",
|
|
795
|
+
"yarn"
|
|
796
|
+
],
|
|
797
|
+
"cvssv3_baseScore": 2.1,
|
|
798
|
+
"security-severity": "2.1"
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"id": "SNYK-JS-SERVESTATIC-7926865",
|
|
803
|
+
"shortDescription": {
|
|
804
|
+
"text": "Low severity - Cross-site Scripting vulnerability in serve-static"
|
|
805
|
+
},
|
|
806
|
+
"fullDescription": {
|
|
807
|
+
"text": "(CVE-2024-43800) serve-static@1.14.1"
|
|
808
|
+
},
|
|
809
|
+
"help": {
|
|
810
|
+
"text": "",
|
|
811
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: serve-static\n* Introduced through: server@1.0.0, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › express@4.17.1 › serve-static@1.14.1\n# Overview\n[serve-static](https://github.com/expressjs/serve-static) is a server.\n\nAffected versions of this package are vulnerable to Cross-site Scripting due to improper sanitization of user input in the `redirect` function. An attacker can manipulate the redirection process by injecting malicious code into the input. \r\n\r\n\r\n**Note**\r\n\r\nTo exploit this vulnerability, the following conditions are required:\r\n\r\n1) The attacker should be able to control the input to `response.redirect()`\r\n\r\n2) express must not redirect before the template appears\r\n\r\n3) the browser must not complete redirection before:\r\n\r\n4) the user must click on the link in the template\n# Details\n\nA cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.\n\nThis is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.\n\nInjecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.\n\nEscaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, `<` can be coded as `<`; and `>` can be coded as `>`; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses `<` and `>` as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.\n \nThe most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. \n\n## Types of attacks\nThere are a few methods by which XSS can be manipulated:\n\n|Type|Origin|Description|\n|--|--|--|\n|**Stored**|Server|The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.|\n|**Reflected**|Server|The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.| \n|**DOM-based**|Client|The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.|\n|**Mutated**| |The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.|\n\n## Affected environments\nThe following environments are susceptible to an XSS attack:\n\n* Web servers\n* Application servers\n* Web application environments\n\n## How to prevent\nThis section describes the top best practices designed to specifically protect your code: \n\n* Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. \n* Convert special characters such as `?`, `&`, `/`, `<`, `>` and spaces to their respective HTML or URL encoded equivalents. \n* Give users the option to disable client-side scripts.\n* Redirect invalid requests.\n* Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.\n* Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.\n* Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.\n\n# Remediation\nUpgrade `serve-static` to version 1.16.0, 2.1.0 or higher.\n# References\n- [GitHub Commit](https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b)\n- [GitHub Commit](https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa)\n"
|
|
812
|
+
},
|
|
813
|
+
"properties": {
|
|
814
|
+
"tags": [
|
|
815
|
+
"security",
|
|
816
|
+
"CWE-79",
|
|
817
|
+
"yarn"
|
|
818
|
+
],
|
|
819
|
+
"cvssv3_baseScore": 2.1,
|
|
820
|
+
"security-severity": "2.1"
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"id": "SNYK-JS-XML2JS-5414874",
|
|
825
|
+
"shortDescription": {
|
|
826
|
+
"text": "Medium severity - Prototype Pollution vulnerability in xml2js"
|
|
827
|
+
},
|
|
828
|
+
"fullDescription": {
|
|
829
|
+
"text": "(CVE-2023-0842) xml2js@0.4.19"
|
|
830
|
+
},
|
|
831
|
+
"help": {
|
|
832
|
+
"text": "",
|
|
833
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: xml2js\n* Introduced through: server@1.0.0, aws-sdk@2.507.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › aws-sdk@2.507.0 › xml2js@0.4.19\n# Overview\n\nAffected versions of this package are vulnerable to Prototype Pollution due to allowing an external attacker to edit or add new properties to an object. This is possible because the application does not properly validate incoming JSON keys, thus allowing the `__proto__` property to be edited.\n# PoC\n```js\r\nvar parseString = require('xml2js').parseString;\r\n\r\nlet normal_user_request = \"<role>admin</role>\";\r\nlet malicious_user_request = \"<__proto__><role>admin</role></__proto__>\";\r\n\r\nconst update_user = (userProp) => {\r\n // A user cannot alter his role. This way we prevent privilege escalations.\r\n parseString(userProp, function (err, user) {\r\n if(user.hasOwnProperty(\"role\") && user?.role.toLowerCase() === \"admin\") {\r\n console.log(\"Unauthorized Action\");\r\n } else {\r\n console.log(user?.role[0]);\r\n }\r\n });\r\n}\r\n\r\nupdate_user(normal_user_request);\r\nupdate_user(malicious_user_request);\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `xml2js` to version 0.5.0 or higher.\n# References\n- [GitHub Commit](https://github.com/Leonidas-from-XIV/node-xml2js/commit/50a492aef9729b8b9b291c5cb2746ec7dc1369db)\n- [GitHub Issue](https://github.com/Leonidas-from-XIV/node-xml2js/issues/593)\n- [GitHub PR](https://github.com/Leonidas-from-XIV/node-xml2js/pull/603)\n- [GitHub PR](https://github.com/Leonidas-from-XIV/node-xml2js/pull/674)\n- [GitHub PR](https://github.com/Leonidas-from-XIV/node-xml2js/pull/681)\n- [PoC](https://fluidattacks.com/advisories/myers/)\n"
|
|
834
|
+
},
|
|
835
|
+
"properties": {
|
|
836
|
+
"tags": [
|
|
837
|
+
"security",
|
|
838
|
+
"CWE-1321",
|
|
839
|
+
"yarn"
|
|
840
|
+
],
|
|
841
|
+
"cvssv3_baseScore": 5.3,
|
|
842
|
+
"security-severity": "5.3"
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"id": "SNYK-JS-Y18N-1021887",
|
|
847
|
+
"shortDescription": {
|
|
848
|
+
"text": "High severity - Prototype Pollution vulnerability in y18n"
|
|
849
|
+
},
|
|
850
|
+
"fullDescription": {
|
|
851
|
+
"text": "(CVE-2020-7774) y18n@3.2.1"
|
|
852
|
+
},
|
|
853
|
+
"help": {
|
|
854
|
+
"text": "",
|
|
855
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: y18n\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › yargs@4.8.1 › y18n@3.2.1\n# Overview\n[y18n](https://www.npmjs.com/package/y18n) is a the bare-bones internationalization library used by yargs\n\nAffected versions of this package are vulnerable to Prototype Pollution due to improper sanitization.\r\n# PoC by po6ix:\r\n```js\r\nconst y18n = require('y18n')();\r\n \r\ny18n.setLocale('__proto__');\r\ny18n.updateLocale({polluted: true});\r\n\r\nconsole.log(polluted); // true\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `y18n` to version 3.2.2, 4.0.1, 5.0.5 or higher.\n# References\n- [GitHub Commit](https://github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)\n- [GitHub Issue](https://github.com/yargs/y18n/issues/96)\n- [GitHub PR](https://github.com/yargs/y18n/pull/108)\n"
|
|
856
|
+
},
|
|
857
|
+
"properties": {
|
|
858
|
+
"tags": [
|
|
859
|
+
"security",
|
|
860
|
+
"CWE-1321",
|
|
861
|
+
"yarn"
|
|
862
|
+
],
|
|
863
|
+
"cvssv3_baseScore": 7.3,
|
|
864
|
+
"security-severity": "7.3"
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"id": "SNYK-JS-YARGSPARSER-560381",
|
|
869
|
+
"shortDescription": {
|
|
870
|
+
"text": "Medium severity - Prototype Pollution vulnerability in yargs-parser"
|
|
871
|
+
},
|
|
872
|
+
"fullDescription": {
|
|
873
|
+
"text": "(CVE-2020-7608) yargs-parser@2.4.1"
|
|
874
|
+
},
|
|
875
|
+
"help": {
|
|
876
|
+
"text": "",
|
|
877
|
+
"markdown": "* Package Manager: yarn\n* Vulnerable module: yargs-parser\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › yargs@4.8.1 › yargs-parser@2.4.1\n# Overview\n[yargs-parser](https://www.npmjs.com/package/yargs-parser) is a mighty option parser used by yargs.\n\nAffected versions of this package are vulnerable to Prototype Pollution. The library could be tricked into adding or modifying properties of `Object.prototype` using a `__proto__` payload.\r\n\r\nOur research team checked several attack vectors to verify this vulnerability:\r\n\r\n1. It could be used for [privilege escalation](https://gist.github.com/Kirill89/dcd8100d010896157a36624119439832).\r\n2. The library could be used to parse user input received from different sources:\r\n - terminal emulators\r\n - system calls from other code bases\r\n - CLI RPC servers\r\n\r\n# PoC by Snyk\r\n```\r\nconst parser = require(\"yargs-parser\");\r\nconsole.log(parser('--foo.__proto__.bar baz'));\r\nconsole.log(({}).bar);\r\n```\n\n# Details\n\nPrototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, `constructor` and `prototype`. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the `Object.prototype` are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.\n\nThere are two main ways in which the pollution of prototypes occurs:\n\n- Unsafe `Object` recursive merge\n \n- Property definition by path\n \n\n## Unsafe Object recursive merge\n\nThe logic of a vulnerable recursive merge function follows the following high-level model:\n```\nmerge (target, source)\n\n foreach property of source\n\n if property exists and is an object on both the target and the source\n\n merge(target[property], source[property])\n\n else\n\n target[property] = source[property]\n```\n<br> \n\nWhen the source object contains a property named `__proto__` defined with `Object.defineProperty()` , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of `Object` and the source of `Object` as defined by the attacker. Properties are then copied on the `Object` prototype.\n\nClone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: `merge({},source)`.\n\n`lodash` and `Hoek` are examples of libraries susceptible to recursive merge attacks.\n\n## Property definition by path\n\nThere are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: `theFunction(object, path, value)`\n\nIf the attacker can control the value of “path”, they can set this value to `__proto__.myValue`. `myValue` is then assigned to the prototype of the class of the object.\n\n# Types of attacks\n\nThere are a few methods by which Prototype Pollution can be manipulated:\n\n| Type |Origin |Short description |\n|--|--|--|\n| **Denial of service (DoS)**|Client |This is the most likely attack. <br>DoS occurs when `Object` holds generic functions that are implicitly called for various operations (for example, `toString` and `valueOf`). <br> The attacker pollutes `Object.prototype.someattr` and alters its state to an unexpected value such as `Int` or `Object`. In this case, the code fails and is likely to cause a denial of service. <br>**For example:** if an attacker pollutes `Object.prototype.toString` by defining it as an integer, if the codebase at any point was reliant on `someobject.toString()` it would fail. |\n |**Remote Code Execution**|Client|Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br>**For example:** `eval(someobject.someattr)`. In this case, if the attacker pollutes `Object.prototype.someattr` they are likely to be able to leverage this in order to execute code.|\n|**Property Injection**|Client|The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> **For example:** if a codebase checks privileges for `someuser.isAdmin`, then when the attacker pollutes `Object.prototype.isAdmin` and sets it to equal `true`, they can then achieve admin privileges.|\n\n# Affected environments\n\nThe following environments are susceptible to a Prototype Pollution attack:\n\n- Application server\n \n- Web server\n\n- Web browser\n \n\n# How to prevent\n\n1. Freeze the prototype— use `Object.freeze (Object.prototype)`.\n \n2. Require schema validation of JSON input.\n \n3. Avoid using unsafe recursive merge functions.\n \n4. Consider using objects without prototypes (for example, `Object.create(null)`), breaking the prototype chain and preventing pollution.\n \n5. As a best practice use `Map` instead of `Object`.\n\n## For more information on this vulnerability type:\n\n[Arteau, Oliver. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018](https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf)\n\n# Remediation\nUpgrade `yargs-parser` to version 5.0.1, 13.1.2, 15.0.1, 18.1.1 or higher.\n# References\n- [Command Injection PoC](https://gist.github.com/Kirill89/dcd8100d010896157a36624119439832)\n- [GitHub Fix Commit](https://github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)\n- [Snyk Research Blog](https://snyk.io/blog/prototype-pollution-minimist/)\n"
|
|
878
|
+
},
|
|
879
|
+
"properties": {
|
|
880
|
+
"tags": [
|
|
881
|
+
"security",
|
|
882
|
+
"CWE-1321",
|
|
883
|
+
"yarn"
|
|
884
|
+
],
|
|
885
|
+
"cvssv3_baseScore": 5.6,
|
|
886
|
+
"security-severity": "5.6"
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"id": "snyk:lic:npm:jmespath:Apache-2.0",
|
|
891
|
+
"shortDescription": {
|
|
892
|
+
"text": "High severity - Apache-2.0 license vulnerability in jmespath"
|
|
893
|
+
},
|
|
894
|
+
"fullDescription": {
|
|
895
|
+
"text": "jmespath@0.15.0"
|
|
896
|
+
},
|
|
897
|
+
"help": {
|
|
898
|
+
"text": "",
|
|
899
|
+
"markdown": "* Package Manager: yarn\n* Module: jmespath\n* Introduced through: server@1.0.0, aws-sdk@2.507.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › aws-sdk@2.507.0 › jmespath@0.15.0\nApache-2.0 license"
|
|
900
|
+
},
|
|
901
|
+
"properties": {
|
|
902
|
+
"tags": [
|
|
903
|
+
"security",
|
|
904
|
+
"yarn"
|
|
905
|
+
],
|
|
906
|
+
"security-severity": "undefined"
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"id": "snyk:lic:npm:kareem:Apache-2.0",
|
|
911
|
+
"shortDescription": {
|
|
912
|
+
"text": "High severity - Apache-2.0 license vulnerability in kareem"
|
|
913
|
+
},
|
|
914
|
+
"fullDescription": {
|
|
915
|
+
"text": "kareem@2.3.0"
|
|
916
|
+
},
|
|
917
|
+
"help": {
|
|
918
|
+
"text": "",
|
|
919
|
+
"markdown": "* Package Manager: yarn\n* Module: kareem\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › kareem@2.3.0\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › kareem@2.3.0\nApache-2.0 license"
|
|
920
|
+
},
|
|
921
|
+
"properties": {
|
|
922
|
+
"tags": [
|
|
923
|
+
"security",
|
|
924
|
+
"yarn"
|
|
925
|
+
],
|
|
926
|
+
"security-severity": "undefined"
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"id": "snyk:lic:npm:mongodb-core:Apache-2.0",
|
|
931
|
+
"shortDescription": {
|
|
932
|
+
"text": "High severity - Apache-2.0 license vulnerability in mongodb-core"
|
|
933
|
+
},
|
|
934
|
+
"fullDescription": {
|
|
935
|
+
"text": "mongodb-core@3.2.7"
|
|
936
|
+
},
|
|
937
|
+
"help": {
|
|
938
|
+
"text": "",
|
|
939
|
+
"markdown": "* Package Manager: yarn\n* Module: mongodb-core\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb-core@3.2.7\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb-core@3.2.7\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7\nApache-2.0 license"
|
|
940
|
+
},
|
|
941
|
+
"properties": {
|
|
942
|
+
"tags": [
|
|
943
|
+
"security",
|
|
944
|
+
"yarn"
|
|
945
|
+
],
|
|
946
|
+
"security-severity": "undefined"
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"id": "snyk:lic:npm:mongodb:Apache-2.0",
|
|
951
|
+
"shortDescription": {
|
|
952
|
+
"text": "High severity - Apache-2.0 license vulnerability in mongodb"
|
|
953
|
+
},
|
|
954
|
+
"fullDescription": {
|
|
955
|
+
"text": "mongodb@3.2.7"
|
|
956
|
+
},
|
|
957
|
+
"help": {
|
|
958
|
+
"text": "",
|
|
959
|
+
"markdown": "* Package Manager: yarn\n* Module: mongodb\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb@3.2.7\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb@3.2.7\nApache-2.0 license"
|
|
960
|
+
},
|
|
961
|
+
"properties": {
|
|
962
|
+
"tags": [
|
|
963
|
+
"security",
|
|
964
|
+
"yarn"
|
|
965
|
+
],
|
|
966
|
+
"security-severity": "undefined"
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"id": "snyk:lic:npm:mongoose-legacy-pluralize:Apache-2.0",
|
|
971
|
+
"shortDescription": {
|
|
972
|
+
"text": "High severity - Apache-2.0 license vulnerability in mongoose-legacy-pluralize"
|
|
973
|
+
},
|
|
974
|
+
"fullDescription": {
|
|
975
|
+
"text": "mongoose-legacy-pluralize@1.0.2"
|
|
976
|
+
},
|
|
977
|
+
"help": {
|
|
978
|
+
"text": "",
|
|
979
|
+
"markdown": "* Package Manager: yarn\n* Module: mongoose-legacy-pluralize\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongoose-legacy-pluralize@1.0.2\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongoose-legacy-pluralize@1.0.2\nApache-2.0 license"
|
|
980
|
+
},
|
|
981
|
+
"properties": {
|
|
982
|
+
"tags": [
|
|
983
|
+
"security",
|
|
984
|
+
"yarn"
|
|
985
|
+
],
|
|
986
|
+
"security-severity": "undefined"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"id": "snyk:lic:npm:require_optional:Apache-2.0",
|
|
991
|
+
"shortDescription": {
|
|
992
|
+
"text": "High severity - Apache-2.0 license vulnerability in require_optional"
|
|
993
|
+
},
|
|
994
|
+
"fullDescription": {
|
|
995
|
+
"text": "require_optional@1.0.1"
|
|
996
|
+
},
|
|
997
|
+
"help": {
|
|
998
|
+
"text": "",
|
|
999
|
+
"markdown": "* Package Manager: yarn\n* Module: require_optional\n* Introduced through: server@1.0.0, mongoose@5.6.9 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › require_optional@1.0.1\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › mongoose@5.6.9 › mongodb@3.2.7 › mongodb-core@3.2.7 › require_optional@1.0.1\nApache-2.0 license"
|
|
1000
|
+
},
|
|
1001
|
+
"properties": {
|
|
1002
|
+
"tags": [
|
|
1003
|
+
"security",
|
|
1004
|
+
"yarn"
|
|
1005
|
+
],
|
|
1006
|
+
"security-severity": "undefined"
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"id": "snyk:lic:npm:rx-lite:Apache-2.0",
|
|
1011
|
+
"shortDescription": {
|
|
1012
|
+
"text": "High severity - Apache-2.0 license vulnerability in rx-lite"
|
|
1013
|
+
},
|
|
1014
|
+
"fullDescription": {
|
|
1015
|
+
"text": "rx-lite@3.1.2"
|
|
1016
|
+
},
|
|
1017
|
+
"help": {
|
|
1018
|
+
"text": "",
|
|
1019
|
+
"markdown": "* Package Manager: yarn\n* Module: rx-lite\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › inquirer@0.12.0 › rx-lite@3.1.2\nApache-2.0 license"
|
|
1020
|
+
},
|
|
1021
|
+
"properties": {
|
|
1022
|
+
"tags": [
|
|
1023
|
+
"security",
|
|
1024
|
+
"yarn"
|
|
1025
|
+
],
|
|
1026
|
+
"security-severity": "undefined"
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"id": "snyk:lic:npm:spdx-correct:Apache-2.0",
|
|
1031
|
+
"shortDescription": {
|
|
1032
|
+
"text": "High severity - Apache-2.0 license vulnerability in spdx-correct"
|
|
1033
|
+
},
|
|
1034
|
+
"fullDescription": {
|
|
1035
|
+
"text": "spdx-correct@3.1.0"
|
|
1036
|
+
},
|
|
1037
|
+
"help": {
|
|
1038
|
+
"text": "",
|
|
1039
|
+
"markdown": "* Package Manager: yarn\n* Module: spdx-correct\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › yargs@4.8.1 › read-pkg-up@1.0.1 › read-pkg@1.1.0 › normalize-package-data@2.5.0 › validate-npm-package-license@3.0.4 › spdx-correct@3.1.0\nApache-2.0 license"
|
|
1040
|
+
},
|
|
1041
|
+
"properties": {
|
|
1042
|
+
"tags": [
|
|
1043
|
+
"security",
|
|
1044
|
+
"yarn"
|
|
1045
|
+
],
|
|
1046
|
+
"security-severity": "undefined"
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"id": "snyk:lic:npm:validate-npm-package-license:Apache-2.0",
|
|
1051
|
+
"shortDescription": {
|
|
1052
|
+
"text": "High severity - Apache-2.0 license vulnerability in validate-npm-package-license"
|
|
1053
|
+
},
|
|
1054
|
+
"fullDescription": {
|
|
1055
|
+
"text": "validate-npm-package-license@3.0.4"
|
|
1056
|
+
},
|
|
1057
|
+
"help": {
|
|
1058
|
+
"text": "",
|
|
1059
|
+
"markdown": "* Package Manager: yarn\n* Module: validate-npm-package-license\n* Introduced through: server@1.0.0, migrate-mongoose@4.0.0 and others\n### Detailed paths\n* _Introduced through_: server@1.0.0 › migrate-mongoose@4.0.0 › yargs@4.8.1 › read-pkg-up@1.0.1 › read-pkg@1.1.0 › normalize-package-data@2.5.0 › validate-npm-package-license@3.0.4\nApache-2.0 license"
|
|
1060
|
+
},
|
|
1061
|
+
"properties": {
|
|
1062
|
+
"tags": [
|
|
1063
|
+
"security",
|
|
1064
|
+
"yarn"
|
|
1065
|
+
],
|
|
1066
|
+
"security-severity": "undefined"
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
]
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
"results": [
|
|
1073
|
+
{
|
|
1074
|
+
"ruleId": "SNYK-JS-ANSIREGEX-1583908",
|
|
1075
|
+
"level": "error",
|
|
1076
|
+
"message": {
|
|
1077
|
+
"text": "This file introduces a vulnerable ansi-regex package with a high severity vulnerability."
|
|
1078
|
+
},
|
|
1079
|
+
"locations": [
|
|
1080
|
+
{
|
|
1081
|
+
"physicalLocation": {
|
|
1082
|
+
"artifactLocation": {
|
|
1083
|
+
"uri": "package.json"
|
|
1084
|
+
},
|
|
1085
|
+
"region": {
|
|
1086
|
+
"startLine": 1
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
"logicalLocations": [
|
|
1090
|
+
{
|
|
1091
|
+
"fullyQualifiedName": "ansi-regex@2.1.1"
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
}
|
|
1095
|
+
]
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"ruleId": "SNYK-JS-ASYNC-2441827",
|
|
1099
|
+
"level": "error",
|
|
1100
|
+
"message": {
|
|
1101
|
+
"text": "This file introduces a vulnerable async package with a high severity vulnerability."
|
|
1102
|
+
},
|
|
1103
|
+
"locations": [
|
|
1104
|
+
{
|
|
1105
|
+
"physicalLocation": {
|
|
1106
|
+
"artifactLocation": {
|
|
1107
|
+
"uri": "package.json"
|
|
1108
|
+
},
|
|
1109
|
+
"region": {
|
|
1110
|
+
"startLine": 1
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
"logicalLocations": [
|
|
1114
|
+
{
|
|
1115
|
+
"fullyQualifiedName": "async@2.6.2"
|
|
1116
|
+
}
|
|
1117
|
+
]
|
|
1118
|
+
}
|
|
1119
|
+
],
|
|
1120
|
+
"fixes": [
|
|
1121
|
+
{
|
|
1122
|
+
"description": {
|
|
1123
|
+
"text": "Upgrade to mongoose@5.7.3"
|
|
1124
|
+
},
|
|
1125
|
+
"artifactChanges": [
|
|
1126
|
+
{
|
|
1127
|
+
"artifactLocation": {
|
|
1128
|
+
"uri": "package.json"
|
|
1129
|
+
},
|
|
1130
|
+
"replacements": [
|
|
1131
|
+
{
|
|
1132
|
+
"deletedRegion": {
|
|
1133
|
+
"startLine": 1
|
|
1134
|
+
},
|
|
1135
|
+
"insertedContent": {
|
|
1136
|
+
"text": "mongoose@5.7.3"
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
]
|
|
1140
|
+
}
|
|
1141
|
+
]
|
|
1142
|
+
}
|
|
1143
|
+
]
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"ruleId": "SNYK-JS-AWSSDK-1059424",
|
|
1147
|
+
"level": "error",
|
|
1148
|
+
"message": {
|
|
1149
|
+
"text": "This file introduces a vulnerable aws-sdk package with a high severity vulnerability."
|
|
1150
|
+
},
|
|
1151
|
+
"locations": [
|
|
1152
|
+
{
|
|
1153
|
+
"physicalLocation": {
|
|
1154
|
+
"artifactLocation": {
|
|
1155
|
+
"uri": "package.json"
|
|
1156
|
+
},
|
|
1157
|
+
"region": {
|
|
1158
|
+
"startLine": 1
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
"logicalLocations": [
|
|
1162
|
+
{
|
|
1163
|
+
"fullyQualifiedName": "aws-sdk@2.507.0"
|
|
1164
|
+
}
|
|
1165
|
+
]
|
|
1166
|
+
}
|
|
1167
|
+
],
|
|
1168
|
+
"fixes": [
|
|
1169
|
+
{
|
|
1170
|
+
"description": {
|
|
1171
|
+
"text": "Upgrade to aws-sdk@2.814.0"
|
|
1172
|
+
},
|
|
1173
|
+
"artifactChanges": [
|
|
1174
|
+
{
|
|
1175
|
+
"artifactLocation": {
|
|
1176
|
+
"uri": "package.json"
|
|
1177
|
+
},
|
|
1178
|
+
"replacements": [
|
|
1179
|
+
{
|
|
1180
|
+
"deletedRegion": {
|
|
1181
|
+
"startLine": 1
|
|
1182
|
+
},
|
|
1183
|
+
"insertedContent": {
|
|
1184
|
+
"text": "aws-sdk@2.814.0"
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
]
|
|
1188
|
+
}
|
|
1189
|
+
]
|
|
1190
|
+
}
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"ruleId": "snyk:lic:npm:aws-sdk:Apache-2.0",
|
|
1195
|
+
"level": "error",
|
|
1196
|
+
"message": {
|
|
1197
|
+
"text": "This file introduces a vulnerable aws-sdk package with a high severity vulnerability."
|
|
1198
|
+
},
|
|
1199
|
+
"locations": [
|
|
1200
|
+
{
|
|
1201
|
+
"physicalLocation": {
|
|
1202
|
+
"artifactLocation": {
|
|
1203
|
+
"uri": "package.json"
|
|
1204
|
+
},
|
|
1205
|
+
"region": {
|
|
1206
|
+
"startLine": 1
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
"logicalLocations": [
|
|
1210
|
+
{
|
|
1211
|
+
"fullyQualifiedName": "aws-sdk@2.507.0"
|
|
1212
|
+
}
|
|
1213
|
+
]
|
|
1214
|
+
}
|
|
1215
|
+
]
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"ruleId": "SNYK-JS-BODYPARSER-7926860",
|
|
1219
|
+
"level": "error",
|
|
1220
|
+
"message": {
|
|
1221
|
+
"text": "This file introduces a vulnerable body-parser package with a high severity vulnerability."
|
|
1222
|
+
},
|
|
1223
|
+
"locations": [
|
|
1224
|
+
{
|
|
1225
|
+
"physicalLocation": {
|
|
1226
|
+
"artifactLocation": {
|
|
1227
|
+
"uri": "package.json"
|
|
1228
|
+
},
|
|
1229
|
+
"region": {
|
|
1230
|
+
"startLine": 1
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
"logicalLocations": [
|
|
1234
|
+
{
|
|
1235
|
+
"fullyQualifiedName": "body-parser@1.19.0"
|
|
1236
|
+
}
|
|
1237
|
+
]
|
|
1238
|
+
}
|
|
1239
|
+
],
|
|
1240
|
+
"fixes": [
|
|
1241
|
+
{
|
|
1242
|
+
"description": {
|
|
1243
|
+
"text": "Upgrade to body-parser@1.20.3"
|
|
1244
|
+
},
|
|
1245
|
+
"artifactChanges": [
|
|
1246
|
+
{
|
|
1247
|
+
"artifactLocation": {
|
|
1248
|
+
"uri": "package.json"
|
|
1249
|
+
},
|
|
1250
|
+
"replacements": [
|
|
1251
|
+
{
|
|
1252
|
+
"deletedRegion": {
|
|
1253
|
+
"startLine": 1
|
|
1254
|
+
},
|
|
1255
|
+
"insertedContent": {
|
|
1256
|
+
"text": "body-parser@1.20.3"
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
]
|
|
1262
|
+
}
|
|
1263
|
+
]
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"ruleId": "SNYK-JS-BSON-561052",
|
|
1267
|
+
"level": "error",
|
|
1268
|
+
"message": {
|
|
1269
|
+
"text": "This file introduces a vulnerable bson package with a high severity vulnerability."
|
|
1270
|
+
},
|
|
1271
|
+
"locations": [
|
|
1272
|
+
{
|
|
1273
|
+
"physicalLocation": {
|
|
1274
|
+
"artifactLocation": {
|
|
1275
|
+
"uri": "package.json"
|
|
1276
|
+
},
|
|
1277
|
+
"region": {
|
|
1278
|
+
"startLine": 1
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
"logicalLocations": [
|
|
1282
|
+
{
|
|
1283
|
+
"fullyQualifiedName": "bson@1.1.1"
|
|
1284
|
+
}
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
],
|
|
1288
|
+
"fixes": [
|
|
1289
|
+
{
|
|
1290
|
+
"description": {
|
|
1291
|
+
"text": "Upgrade to mongoose@5.6.9"
|
|
1292
|
+
},
|
|
1293
|
+
"artifactChanges": [
|
|
1294
|
+
{
|
|
1295
|
+
"artifactLocation": {
|
|
1296
|
+
"uri": "package.json"
|
|
1297
|
+
},
|
|
1298
|
+
"replacements": [
|
|
1299
|
+
{
|
|
1300
|
+
"deletedRegion": {
|
|
1301
|
+
"startLine": 1
|
|
1302
|
+
},
|
|
1303
|
+
"insertedContent": {
|
|
1304
|
+
"text": "mongoose@5.6.9"
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
]
|
|
1308
|
+
}
|
|
1309
|
+
]
|
|
1310
|
+
}
|
|
1311
|
+
]
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"ruleId": "SNYK-JS-BSON-6056525",
|
|
1315
|
+
"level": "error",
|
|
1316
|
+
"message": {
|
|
1317
|
+
"text": "This file introduces a vulnerable bson package with a high severity vulnerability."
|
|
1318
|
+
},
|
|
1319
|
+
"locations": [
|
|
1320
|
+
{
|
|
1321
|
+
"physicalLocation": {
|
|
1322
|
+
"artifactLocation": {
|
|
1323
|
+
"uri": "package.json"
|
|
1324
|
+
},
|
|
1325
|
+
"region": {
|
|
1326
|
+
"startLine": 1
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
"logicalLocations": [
|
|
1330
|
+
{
|
|
1331
|
+
"fullyQualifiedName": "bson@1.1.1"
|
|
1332
|
+
}
|
|
1333
|
+
]
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"fixes": [
|
|
1337
|
+
{
|
|
1338
|
+
"description": {
|
|
1339
|
+
"text": "Upgrade to mongoose@5.6.9"
|
|
1340
|
+
},
|
|
1341
|
+
"artifactChanges": [
|
|
1342
|
+
{
|
|
1343
|
+
"artifactLocation": {
|
|
1344
|
+
"uri": "package.json"
|
|
1345
|
+
},
|
|
1346
|
+
"replacements": [
|
|
1347
|
+
{
|
|
1348
|
+
"deletedRegion": {
|
|
1349
|
+
"startLine": 1
|
|
1350
|
+
},
|
|
1351
|
+
"insertedContent": {
|
|
1352
|
+
"text": "mongoose@5.6.9"
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
]
|
|
1356
|
+
}
|
|
1357
|
+
]
|
|
1358
|
+
}
|
|
1359
|
+
]
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"ruleId": "snyk:lic:npm:bson:Apache-2.0",
|
|
1363
|
+
"level": "error",
|
|
1364
|
+
"message": {
|
|
1365
|
+
"text": "This file introduces a vulnerable bson package with a high severity vulnerability."
|
|
1366
|
+
},
|
|
1367
|
+
"locations": [
|
|
1368
|
+
{
|
|
1369
|
+
"physicalLocation": {
|
|
1370
|
+
"artifactLocation": {
|
|
1371
|
+
"uri": "package.json"
|
|
1372
|
+
},
|
|
1373
|
+
"region": {
|
|
1374
|
+
"startLine": 1
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
"logicalLocations": [
|
|
1378
|
+
{
|
|
1379
|
+
"fullyQualifiedName": "bson@1.1.1"
|
|
1380
|
+
}
|
|
1381
|
+
]
|
|
1382
|
+
}
|
|
1383
|
+
]
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"ruleId": "SNYK-JS-COOKIE-8163060",
|
|
1387
|
+
"level": "warning",
|
|
1388
|
+
"message": {
|
|
1389
|
+
"text": "This file introduces a vulnerable cookie package with a medium severity vulnerability."
|
|
1390
|
+
},
|
|
1391
|
+
"locations": [
|
|
1392
|
+
{
|
|
1393
|
+
"physicalLocation": {
|
|
1394
|
+
"artifactLocation": {
|
|
1395
|
+
"uri": "package.json"
|
|
1396
|
+
},
|
|
1397
|
+
"region": {
|
|
1398
|
+
"startLine": 1
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
"logicalLocations": [
|
|
1402
|
+
{
|
|
1403
|
+
"fullyQualifiedName": "cookie@0.4.0"
|
|
1404
|
+
}
|
|
1405
|
+
]
|
|
1406
|
+
}
|
|
1407
|
+
],
|
|
1408
|
+
"fixes": [
|
|
1409
|
+
{
|
|
1410
|
+
"description": {
|
|
1411
|
+
"text": "Upgrade to express@4.21.1"
|
|
1412
|
+
},
|
|
1413
|
+
"artifactChanges": [
|
|
1414
|
+
{
|
|
1415
|
+
"artifactLocation": {
|
|
1416
|
+
"uri": "package.json"
|
|
1417
|
+
},
|
|
1418
|
+
"replacements": [
|
|
1419
|
+
{
|
|
1420
|
+
"deletedRegion": {
|
|
1421
|
+
"startLine": 1
|
|
1422
|
+
},
|
|
1423
|
+
"insertedContent": {
|
|
1424
|
+
"text": "express@4.21.1"
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
]
|
|
1428
|
+
}
|
|
1429
|
+
]
|
|
1430
|
+
}
|
|
1431
|
+
]
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"ruleId": "SNYK-JS-EXPRESS-6474509",
|
|
1435
|
+
"level": "warning",
|
|
1436
|
+
"message": {
|
|
1437
|
+
"text": "This file introduces a vulnerable express package with a medium severity vulnerability."
|
|
1438
|
+
},
|
|
1439
|
+
"locations": [
|
|
1440
|
+
{
|
|
1441
|
+
"physicalLocation": {
|
|
1442
|
+
"artifactLocation": {
|
|
1443
|
+
"uri": "package.json"
|
|
1444
|
+
},
|
|
1445
|
+
"region": {
|
|
1446
|
+
"startLine": 1
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
"logicalLocations": [
|
|
1450
|
+
{
|
|
1451
|
+
"fullyQualifiedName": "express@4.17.1"
|
|
1452
|
+
}
|
|
1453
|
+
]
|
|
1454
|
+
}
|
|
1455
|
+
],
|
|
1456
|
+
"fixes": [
|
|
1457
|
+
{
|
|
1458
|
+
"description": {
|
|
1459
|
+
"text": "Upgrade to express@4.19.2"
|
|
1460
|
+
},
|
|
1461
|
+
"artifactChanges": [
|
|
1462
|
+
{
|
|
1463
|
+
"artifactLocation": {
|
|
1464
|
+
"uri": "package.json"
|
|
1465
|
+
},
|
|
1466
|
+
"replacements": [
|
|
1467
|
+
{
|
|
1468
|
+
"deletedRegion": {
|
|
1469
|
+
"startLine": 1
|
|
1470
|
+
},
|
|
1471
|
+
"insertedContent": {
|
|
1472
|
+
"text": "express@4.19.2"
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
]
|
|
1476
|
+
}
|
|
1477
|
+
]
|
|
1478
|
+
}
|
|
1479
|
+
]
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
"ruleId": "SNYK-JS-EXPRESS-7926867",
|
|
1483
|
+
"level": "warning",
|
|
1484
|
+
"message": {
|
|
1485
|
+
"text": "This file introduces a vulnerable express package with a medium severity vulnerability."
|
|
1486
|
+
},
|
|
1487
|
+
"locations": [
|
|
1488
|
+
{
|
|
1489
|
+
"physicalLocation": {
|
|
1490
|
+
"artifactLocation": {
|
|
1491
|
+
"uri": "package.json"
|
|
1492
|
+
},
|
|
1493
|
+
"region": {
|
|
1494
|
+
"startLine": 1
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1497
|
+
"logicalLocations": [
|
|
1498
|
+
{
|
|
1499
|
+
"fullyQualifiedName": "express@4.17.1"
|
|
1500
|
+
}
|
|
1501
|
+
]
|
|
1502
|
+
}
|
|
1503
|
+
],
|
|
1504
|
+
"fixes": [
|
|
1505
|
+
{
|
|
1506
|
+
"description": {
|
|
1507
|
+
"text": "Upgrade to express@4.20.0"
|
|
1508
|
+
},
|
|
1509
|
+
"artifactChanges": [
|
|
1510
|
+
{
|
|
1511
|
+
"artifactLocation": {
|
|
1512
|
+
"uri": "package.json"
|
|
1513
|
+
},
|
|
1514
|
+
"replacements": [
|
|
1515
|
+
{
|
|
1516
|
+
"deletedRegion": {
|
|
1517
|
+
"startLine": 1
|
|
1518
|
+
},
|
|
1519
|
+
"insertedContent": {
|
|
1520
|
+
"text": "express@4.20.0"
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
]
|
|
1524
|
+
}
|
|
1525
|
+
]
|
|
1526
|
+
}
|
|
1527
|
+
]
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
"ruleId": "SNYK-JS-HOSTEDGITINFO-1088355",
|
|
1531
|
+
"level": "warning",
|
|
1532
|
+
"message": {
|
|
1533
|
+
"text": "This file introduces a vulnerable hosted-git-info package with a medium severity vulnerability."
|
|
1534
|
+
},
|
|
1535
|
+
"locations": [
|
|
1536
|
+
{
|
|
1537
|
+
"physicalLocation": {
|
|
1538
|
+
"artifactLocation": {
|
|
1539
|
+
"uri": "package.json"
|
|
1540
|
+
},
|
|
1541
|
+
"region": {
|
|
1542
|
+
"startLine": 1
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
"logicalLocations": [
|
|
1546
|
+
{
|
|
1547
|
+
"fullyQualifiedName": "hosted-git-info@2.8.2"
|
|
1548
|
+
}
|
|
1549
|
+
]
|
|
1550
|
+
}
|
|
1551
|
+
]
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
"ruleId": "SNYK-JS-LODASH-1018905",
|
|
1555
|
+
"level": "warning",
|
|
1556
|
+
"message": {
|
|
1557
|
+
"text": "This file introduces a vulnerable lodash package with a medium severity vulnerability."
|
|
1558
|
+
},
|
|
1559
|
+
"locations": [
|
|
1560
|
+
{
|
|
1561
|
+
"physicalLocation": {
|
|
1562
|
+
"artifactLocation": {
|
|
1563
|
+
"uri": "package.json"
|
|
1564
|
+
},
|
|
1565
|
+
"region": {
|
|
1566
|
+
"startLine": 1
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
"logicalLocations": [
|
|
1570
|
+
{
|
|
1571
|
+
"fullyQualifiedName": "lodash@4.17.15"
|
|
1572
|
+
}
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
]
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"ruleId": "SNYK-JS-LODASH-1040724",
|
|
1579
|
+
"level": "error",
|
|
1580
|
+
"message": {
|
|
1581
|
+
"text": "This file introduces a vulnerable lodash package with a high severity vulnerability."
|
|
1582
|
+
},
|
|
1583
|
+
"locations": [
|
|
1584
|
+
{
|
|
1585
|
+
"physicalLocation": {
|
|
1586
|
+
"artifactLocation": {
|
|
1587
|
+
"uri": "package.json"
|
|
1588
|
+
},
|
|
1589
|
+
"region": {
|
|
1590
|
+
"startLine": 1
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
"logicalLocations": [
|
|
1594
|
+
{
|
|
1595
|
+
"fullyQualifiedName": "lodash@4.17.15"
|
|
1596
|
+
}
|
|
1597
|
+
]
|
|
1598
|
+
}
|
|
1599
|
+
]
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
"ruleId": "SNYK-JS-LODASH-567746",
|
|
1603
|
+
"level": "error",
|
|
1604
|
+
"message": {
|
|
1605
|
+
"text": "This file introduces a vulnerable lodash package with a high severity vulnerability."
|
|
1606
|
+
},
|
|
1607
|
+
"locations": [
|
|
1608
|
+
{
|
|
1609
|
+
"physicalLocation": {
|
|
1610
|
+
"artifactLocation": {
|
|
1611
|
+
"uri": "package.json"
|
|
1612
|
+
},
|
|
1613
|
+
"region": {
|
|
1614
|
+
"startLine": 1
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
"logicalLocations": [
|
|
1618
|
+
{
|
|
1619
|
+
"fullyQualifiedName": "lodash@4.17.15"
|
|
1620
|
+
}
|
|
1621
|
+
]
|
|
1622
|
+
}
|
|
1623
|
+
]
|
|
1624
|
+
},
|
|
1625
|
+
{
|
|
1626
|
+
"ruleId": "SNYK-JS-LODASH-608086",
|
|
1627
|
+
"level": "error",
|
|
1628
|
+
"message": {
|
|
1629
|
+
"text": "This file introduces a vulnerable lodash package with a high severity vulnerability."
|
|
1630
|
+
},
|
|
1631
|
+
"locations": [
|
|
1632
|
+
{
|
|
1633
|
+
"physicalLocation": {
|
|
1634
|
+
"artifactLocation": {
|
|
1635
|
+
"uri": "package.json"
|
|
1636
|
+
},
|
|
1637
|
+
"region": {
|
|
1638
|
+
"startLine": 1
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
"logicalLocations": [
|
|
1642
|
+
{
|
|
1643
|
+
"fullyQualifiedName": "lodash@4.17.15"
|
|
1644
|
+
}
|
|
1645
|
+
]
|
|
1646
|
+
}
|
|
1647
|
+
]
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
"ruleId": "SNYK-JS-LODASH-6139239",
|
|
1651
|
+
"level": "error",
|
|
1652
|
+
"message": {
|
|
1653
|
+
"text": "This file introduces a vulnerable lodash package with a high severity vulnerability."
|
|
1654
|
+
},
|
|
1655
|
+
"locations": [
|
|
1656
|
+
{
|
|
1657
|
+
"physicalLocation": {
|
|
1658
|
+
"artifactLocation": {
|
|
1659
|
+
"uri": "package.json"
|
|
1660
|
+
},
|
|
1661
|
+
"region": {
|
|
1662
|
+
"startLine": 1
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
"logicalLocations": [
|
|
1666
|
+
{
|
|
1667
|
+
"fullyQualifiedName": "lodash@4.17.15"
|
|
1668
|
+
}
|
|
1669
|
+
]
|
|
1670
|
+
}
|
|
1671
|
+
]
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"ruleId": "SNYK-JS-MINIMIST-2429795",
|
|
1675
|
+
"level": "note",
|
|
1676
|
+
"message": {
|
|
1677
|
+
"text": "This file introduces a vulnerable minimist package with a low severity vulnerability."
|
|
1678
|
+
},
|
|
1679
|
+
"locations": [
|
|
1680
|
+
{
|
|
1681
|
+
"physicalLocation": {
|
|
1682
|
+
"artifactLocation": {
|
|
1683
|
+
"uri": "package.json"
|
|
1684
|
+
},
|
|
1685
|
+
"region": {
|
|
1686
|
+
"startLine": 1
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1689
|
+
"logicalLocations": [
|
|
1690
|
+
{
|
|
1691
|
+
"fullyQualifiedName": "minimist@0.0.8"
|
|
1692
|
+
}
|
|
1693
|
+
]
|
|
1694
|
+
}
|
|
1695
|
+
]
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"ruleId": "SNYK-JS-MINIMIST-559764",
|
|
1699
|
+
"level": "warning",
|
|
1700
|
+
"message": {
|
|
1701
|
+
"text": "This file introduces a vulnerable minimist package with a medium severity vulnerability."
|
|
1702
|
+
},
|
|
1703
|
+
"locations": [
|
|
1704
|
+
{
|
|
1705
|
+
"physicalLocation": {
|
|
1706
|
+
"artifactLocation": {
|
|
1707
|
+
"uri": "package.json"
|
|
1708
|
+
},
|
|
1709
|
+
"region": {
|
|
1710
|
+
"startLine": 1
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
"logicalLocations": [
|
|
1714
|
+
{
|
|
1715
|
+
"fullyQualifiedName": "minimist@0.0.8"
|
|
1716
|
+
}
|
|
1717
|
+
]
|
|
1718
|
+
}
|
|
1719
|
+
],
|
|
1720
|
+
"fixes": [
|
|
1721
|
+
{
|
|
1722
|
+
"description": {
|
|
1723
|
+
"text": "Upgrade to migrate-mongoose@4.0.0"
|
|
1724
|
+
},
|
|
1725
|
+
"artifactChanges": [
|
|
1726
|
+
{
|
|
1727
|
+
"artifactLocation": {
|
|
1728
|
+
"uri": "package.json"
|
|
1729
|
+
},
|
|
1730
|
+
"replacements": [
|
|
1731
|
+
{
|
|
1732
|
+
"deletedRegion": {
|
|
1733
|
+
"startLine": 1
|
|
1734
|
+
},
|
|
1735
|
+
"insertedContent": {
|
|
1736
|
+
"text": "migrate-mongoose@4.0.0"
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
]
|
|
1740
|
+
}
|
|
1741
|
+
]
|
|
1742
|
+
}
|
|
1743
|
+
]
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"ruleId": "SNYK-JS-MONGOOSE-1086688",
|
|
1747
|
+
"level": "warning",
|
|
1748
|
+
"message": {
|
|
1749
|
+
"text": "This file introduces a vulnerable mongoose package with a medium severity vulnerability."
|
|
1750
|
+
},
|
|
1751
|
+
"locations": [
|
|
1752
|
+
{
|
|
1753
|
+
"physicalLocation": {
|
|
1754
|
+
"artifactLocation": {
|
|
1755
|
+
"uri": "package.json"
|
|
1756
|
+
},
|
|
1757
|
+
"region": {
|
|
1758
|
+
"startLine": 1
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
"logicalLocations": [
|
|
1762
|
+
{
|
|
1763
|
+
"fullyQualifiedName": "mongoose@5.6.9"
|
|
1764
|
+
}
|
|
1765
|
+
]
|
|
1766
|
+
}
|
|
1767
|
+
],
|
|
1768
|
+
"fixes": [
|
|
1769
|
+
{
|
|
1770
|
+
"description": {
|
|
1771
|
+
"text": "Upgrade to mongoose@5.12.2"
|
|
1772
|
+
},
|
|
1773
|
+
"artifactChanges": [
|
|
1774
|
+
{
|
|
1775
|
+
"artifactLocation": {
|
|
1776
|
+
"uri": "package.json"
|
|
1777
|
+
},
|
|
1778
|
+
"replacements": [
|
|
1779
|
+
{
|
|
1780
|
+
"deletedRegion": {
|
|
1781
|
+
"startLine": 1
|
|
1782
|
+
},
|
|
1783
|
+
"insertedContent": {
|
|
1784
|
+
"text": "mongoose@5.12.2"
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
]
|
|
1788
|
+
}
|
|
1789
|
+
]
|
|
1790
|
+
}
|
|
1791
|
+
]
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"ruleId": "SNYK-JS-MONGOOSE-2961688",
|
|
1795
|
+
"level": "error",
|
|
1796
|
+
"message": {
|
|
1797
|
+
"text": "This file introduces a vulnerable mongoose package with a high severity vulnerability."
|
|
1798
|
+
},
|
|
1799
|
+
"locations": [
|
|
1800
|
+
{
|
|
1801
|
+
"physicalLocation": {
|
|
1802
|
+
"artifactLocation": {
|
|
1803
|
+
"uri": "package.json"
|
|
1804
|
+
},
|
|
1805
|
+
"region": {
|
|
1806
|
+
"startLine": 1
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
"logicalLocations": [
|
|
1810
|
+
{
|
|
1811
|
+
"fullyQualifiedName": "mongoose@5.6.9"
|
|
1812
|
+
}
|
|
1813
|
+
]
|
|
1814
|
+
}
|
|
1815
|
+
],
|
|
1816
|
+
"fixes": [
|
|
1817
|
+
{
|
|
1818
|
+
"description": {
|
|
1819
|
+
"text": "Upgrade to mongoose@5.13.15"
|
|
1820
|
+
},
|
|
1821
|
+
"artifactChanges": [
|
|
1822
|
+
{
|
|
1823
|
+
"artifactLocation": {
|
|
1824
|
+
"uri": "package.json"
|
|
1825
|
+
},
|
|
1826
|
+
"replacements": [
|
|
1827
|
+
{
|
|
1828
|
+
"deletedRegion": {
|
|
1829
|
+
"startLine": 1
|
|
1830
|
+
},
|
|
1831
|
+
"insertedContent": {
|
|
1832
|
+
"text": "mongoose@5.13.15"
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
]
|
|
1836
|
+
}
|
|
1837
|
+
]
|
|
1838
|
+
}
|
|
1839
|
+
]
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
"ruleId": "SNYK-JS-MONGOOSE-472486",
|
|
1843
|
+
"level": "warning",
|
|
1844
|
+
"message": {
|
|
1845
|
+
"text": "This file introduces a vulnerable mongoose package with a medium severity vulnerability."
|
|
1846
|
+
},
|
|
1847
|
+
"locations": [
|
|
1848
|
+
{
|
|
1849
|
+
"physicalLocation": {
|
|
1850
|
+
"artifactLocation": {
|
|
1851
|
+
"uri": "package.json"
|
|
1852
|
+
},
|
|
1853
|
+
"region": {
|
|
1854
|
+
"startLine": 1
|
|
1855
|
+
}
|
|
1856
|
+
},
|
|
1857
|
+
"logicalLocations": [
|
|
1858
|
+
{
|
|
1859
|
+
"fullyQualifiedName": "mongoose@5.6.9"
|
|
1860
|
+
}
|
|
1861
|
+
]
|
|
1862
|
+
}
|
|
1863
|
+
],
|
|
1864
|
+
"fixes": [
|
|
1865
|
+
{
|
|
1866
|
+
"description": {
|
|
1867
|
+
"text": "Upgrade to mongoose@5.7.5"
|
|
1868
|
+
},
|
|
1869
|
+
"artifactChanges": [
|
|
1870
|
+
{
|
|
1871
|
+
"artifactLocation": {
|
|
1872
|
+
"uri": "package.json"
|
|
1873
|
+
},
|
|
1874
|
+
"replacements": [
|
|
1875
|
+
{
|
|
1876
|
+
"deletedRegion": {
|
|
1877
|
+
"startLine": 1
|
|
1878
|
+
},
|
|
1879
|
+
"insertedContent": {
|
|
1880
|
+
"text": "mongoose@5.7.5"
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
]
|
|
1884
|
+
}
|
|
1885
|
+
]
|
|
1886
|
+
}
|
|
1887
|
+
]
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
"ruleId": "SNYK-JS-MONGOOSE-5777721",
|
|
1891
|
+
"level": "error",
|
|
1892
|
+
"message": {
|
|
1893
|
+
"text": "This file introduces a vulnerable mongoose package with a high severity vulnerability."
|
|
1894
|
+
},
|
|
1895
|
+
"locations": [
|
|
1896
|
+
{
|
|
1897
|
+
"physicalLocation": {
|
|
1898
|
+
"artifactLocation": {
|
|
1899
|
+
"uri": "package.json"
|
|
1900
|
+
},
|
|
1901
|
+
"region": {
|
|
1902
|
+
"startLine": 1
|
|
1903
|
+
}
|
|
1904
|
+
},
|
|
1905
|
+
"logicalLocations": [
|
|
1906
|
+
{
|
|
1907
|
+
"fullyQualifiedName": "mongoose@5.6.9"
|
|
1908
|
+
}
|
|
1909
|
+
]
|
|
1910
|
+
}
|
|
1911
|
+
],
|
|
1912
|
+
"fixes": [
|
|
1913
|
+
{
|
|
1914
|
+
"description": {
|
|
1915
|
+
"text": "Upgrade to mongoose@5.13.20"
|
|
1916
|
+
},
|
|
1917
|
+
"artifactChanges": [
|
|
1918
|
+
{
|
|
1919
|
+
"artifactLocation": {
|
|
1920
|
+
"uri": "package.json"
|
|
1921
|
+
},
|
|
1922
|
+
"replacements": [
|
|
1923
|
+
{
|
|
1924
|
+
"deletedRegion": {
|
|
1925
|
+
"startLine": 1
|
|
1926
|
+
},
|
|
1927
|
+
"insertedContent": {
|
|
1928
|
+
"text": "mongoose@5.13.20"
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
]
|
|
1932
|
+
}
|
|
1933
|
+
]
|
|
1934
|
+
}
|
|
1935
|
+
]
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
"ruleId": "SNYK-JS-MONGOOSE-8446504",
|
|
1939
|
+
"level": "error",
|
|
1940
|
+
"message": {
|
|
1941
|
+
"text": "This file introduces a vulnerable mongoose package with a high severity vulnerability."
|
|
1942
|
+
},
|
|
1943
|
+
"locations": [
|
|
1944
|
+
{
|
|
1945
|
+
"physicalLocation": {
|
|
1946
|
+
"artifactLocation": {
|
|
1947
|
+
"uri": "package.json"
|
|
1948
|
+
},
|
|
1949
|
+
"region": {
|
|
1950
|
+
"startLine": 1
|
|
1951
|
+
}
|
|
1952
|
+
},
|
|
1953
|
+
"logicalLocations": [
|
|
1954
|
+
{
|
|
1955
|
+
"fullyQualifiedName": "mongoose@5.6.9"
|
|
1956
|
+
}
|
|
1957
|
+
]
|
|
1958
|
+
}
|
|
1959
|
+
],
|
|
1960
|
+
"fixes": [
|
|
1961
|
+
{
|
|
1962
|
+
"description": {
|
|
1963
|
+
"text": "Upgrade to mongoose@6.13.5"
|
|
1964
|
+
},
|
|
1965
|
+
"artifactChanges": [
|
|
1966
|
+
{
|
|
1967
|
+
"artifactLocation": {
|
|
1968
|
+
"uri": "package.json"
|
|
1969
|
+
},
|
|
1970
|
+
"replacements": [
|
|
1971
|
+
{
|
|
1972
|
+
"deletedRegion": {
|
|
1973
|
+
"startLine": 1
|
|
1974
|
+
},
|
|
1975
|
+
"insertedContent": {
|
|
1976
|
+
"text": "mongoose@6.13.5"
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
]
|
|
1980
|
+
}
|
|
1981
|
+
]
|
|
1982
|
+
}
|
|
1983
|
+
]
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
"ruleId": "SNYK-JS-MONGOOSE-8623536",
|
|
1987
|
+
"level": "error",
|
|
1988
|
+
"message": {
|
|
1989
|
+
"text": "This file introduces a vulnerable mongoose package with a high severity vulnerability."
|
|
1990
|
+
},
|
|
1991
|
+
"locations": [
|
|
1992
|
+
{
|
|
1993
|
+
"physicalLocation": {
|
|
1994
|
+
"artifactLocation": {
|
|
1995
|
+
"uri": "package.json"
|
|
1996
|
+
},
|
|
1997
|
+
"region": {
|
|
1998
|
+
"startLine": 1
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
"logicalLocations": [
|
|
2002
|
+
{
|
|
2003
|
+
"fullyQualifiedName": "mongoose@5.6.9"
|
|
2004
|
+
}
|
|
2005
|
+
]
|
|
2006
|
+
}
|
|
2007
|
+
],
|
|
2008
|
+
"fixes": [
|
|
2009
|
+
{
|
|
2010
|
+
"description": {
|
|
2011
|
+
"text": "Upgrade to mongoose@6.13.6"
|
|
2012
|
+
},
|
|
2013
|
+
"artifactChanges": [
|
|
2014
|
+
{
|
|
2015
|
+
"artifactLocation": {
|
|
2016
|
+
"uri": "package.json"
|
|
2017
|
+
},
|
|
2018
|
+
"replacements": [
|
|
2019
|
+
{
|
|
2020
|
+
"deletedRegion": {
|
|
2021
|
+
"startLine": 1
|
|
2022
|
+
},
|
|
2023
|
+
"insertedContent": {
|
|
2024
|
+
"text": "mongoose@6.13.6"
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
]
|
|
2028
|
+
}
|
|
2029
|
+
]
|
|
2030
|
+
}
|
|
2031
|
+
]
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
"ruleId": "SNYK-JS-MPATH-1577289",
|
|
2035
|
+
"level": "warning",
|
|
2036
|
+
"message": {
|
|
2037
|
+
"text": "This file introduces a vulnerable mpath package with a medium severity vulnerability."
|
|
2038
|
+
},
|
|
2039
|
+
"locations": [
|
|
2040
|
+
{
|
|
2041
|
+
"physicalLocation": {
|
|
2042
|
+
"artifactLocation": {
|
|
2043
|
+
"uri": "package.json"
|
|
2044
|
+
},
|
|
2045
|
+
"region": {
|
|
2046
|
+
"startLine": 1
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
"logicalLocations": [
|
|
2050
|
+
{
|
|
2051
|
+
"fullyQualifiedName": "mpath@0.6.0"
|
|
2052
|
+
}
|
|
2053
|
+
]
|
|
2054
|
+
}
|
|
2055
|
+
],
|
|
2056
|
+
"fixes": [
|
|
2057
|
+
{
|
|
2058
|
+
"description": {
|
|
2059
|
+
"text": "Upgrade to mongoose@5.13.9"
|
|
2060
|
+
},
|
|
2061
|
+
"artifactChanges": [
|
|
2062
|
+
{
|
|
2063
|
+
"artifactLocation": {
|
|
2064
|
+
"uri": "package.json"
|
|
2065
|
+
},
|
|
2066
|
+
"replacements": [
|
|
2067
|
+
{
|
|
2068
|
+
"deletedRegion": {
|
|
2069
|
+
"startLine": 1
|
|
2070
|
+
},
|
|
2071
|
+
"insertedContent": {
|
|
2072
|
+
"text": "mongoose@5.13.9"
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
]
|
|
2076
|
+
}
|
|
2077
|
+
]
|
|
2078
|
+
}
|
|
2079
|
+
]
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
"ruleId": "SNYK-JS-MQUERY-1050858",
|
|
2083
|
+
"level": "error",
|
|
2084
|
+
"message": {
|
|
2085
|
+
"text": "This file introduces a vulnerable mquery package with a high severity vulnerability."
|
|
2086
|
+
},
|
|
2087
|
+
"locations": [
|
|
2088
|
+
{
|
|
2089
|
+
"physicalLocation": {
|
|
2090
|
+
"artifactLocation": {
|
|
2091
|
+
"uri": "package.json"
|
|
2092
|
+
},
|
|
2093
|
+
"region": {
|
|
2094
|
+
"startLine": 1
|
|
2095
|
+
}
|
|
2096
|
+
},
|
|
2097
|
+
"logicalLocations": [
|
|
2098
|
+
{
|
|
2099
|
+
"fullyQualifiedName": "mquery@3.2.1"
|
|
2100
|
+
}
|
|
2101
|
+
]
|
|
2102
|
+
}
|
|
2103
|
+
],
|
|
2104
|
+
"fixes": [
|
|
2105
|
+
{
|
|
2106
|
+
"description": {
|
|
2107
|
+
"text": "Upgrade to mongoose@5.11.7"
|
|
2108
|
+
},
|
|
2109
|
+
"artifactChanges": [
|
|
2110
|
+
{
|
|
2111
|
+
"artifactLocation": {
|
|
2112
|
+
"uri": "package.json"
|
|
2113
|
+
},
|
|
2114
|
+
"replacements": [
|
|
2115
|
+
{
|
|
2116
|
+
"deletedRegion": {
|
|
2117
|
+
"startLine": 1
|
|
2118
|
+
},
|
|
2119
|
+
"insertedContent": {
|
|
2120
|
+
"text": "mongoose@5.11.7"
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
]
|
|
2124
|
+
}
|
|
2125
|
+
]
|
|
2126
|
+
}
|
|
2127
|
+
]
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
"ruleId": "SNYK-JS-MQUERY-1089718",
|
|
2131
|
+
"level": "error",
|
|
2132
|
+
"message": {
|
|
2133
|
+
"text": "This file introduces a vulnerable mquery package with a high severity vulnerability."
|
|
2134
|
+
},
|
|
2135
|
+
"locations": [
|
|
2136
|
+
{
|
|
2137
|
+
"physicalLocation": {
|
|
2138
|
+
"artifactLocation": {
|
|
2139
|
+
"uri": "package.json"
|
|
2140
|
+
},
|
|
2141
|
+
"region": {
|
|
2142
|
+
"startLine": 1
|
|
2143
|
+
}
|
|
2144
|
+
},
|
|
2145
|
+
"logicalLocations": [
|
|
2146
|
+
{
|
|
2147
|
+
"fullyQualifiedName": "mquery@3.2.1"
|
|
2148
|
+
}
|
|
2149
|
+
]
|
|
2150
|
+
}
|
|
2151
|
+
],
|
|
2152
|
+
"fixes": [
|
|
2153
|
+
{
|
|
2154
|
+
"description": {
|
|
2155
|
+
"text": "Upgrade to mongoose@5.12.3"
|
|
2156
|
+
},
|
|
2157
|
+
"artifactChanges": [
|
|
2158
|
+
{
|
|
2159
|
+
"artifactLocation": {
|
|
2160
|
+
"uri": "package.json"
|
|
2161
|
+
},
|
|
2162
|
+
"replacements": [
|
|
2163
|
+
{
|
|
2164
|
+
"deletedRegion": {
|
|
2165
|
+
"startLine": 1
|
|
2166
|
+
},
|
|
2167
|
+
"insertedContent": {
|
|
2168
|
+
"text": "mongoose@5.12.3"
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
]
|
|
2172
|
+
}
|
|
2173
|
+
]
|
|
2174
|
+
}
|
|
2175
|
+
]
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
"ruleId": "SNYK-JS-PASSPORT-2840631",
|
|
2179
|
+
"level": "warning",
|
|
2180
|
+
"message": {
|
|
2181
|
+
"text": "This file introduces a vulnerable passport package with a medium severity vulnerability."
|
|
2182
|
+
},
|
|
2183
|
+
"locations": [
|
|
2184
|
+
{
|
|
2185
|
+
"physicalLocation": {
|
|
2186
|
+
"artifactLocation": {
|
|
2187
|
+
"uri": "package.json"
|
|
2188
|
+
},
|
|
2189
|
+
"region": {
|
|
2190
|
+
"startLine": 1
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
"logicalLocations": [
|
|
2194
|
+
{
|
|
2195
|
+
"fullyQualifiedName": "passport@0.4.0"
|
|
2196
|
+
}
|
|
2197
|
+
]
|
|
2198
|
+
}
|
|
2199
|
+
],
|
|
2200
|
+
"fixes": [
|
|
2201
|
+
{
|
|
2202
|
+
"description": {
|
|
2203
|
+
"text": "Upgrade to passport@0.6.0"
|
|
2204
|
+
},
|
|
2205
|
+
"artifactChanges": [
|
|
2206
|
+
{
|
|
2207
|
+
"artifactLocation": {
|
|
2208
|
+
"uri": "package.json"
|
|
2209
|
+
},
|
|
2210
|
+
"replacements": [
|
|
2211
|
+
{
|
|
2212
|
+
"deletedRegion": {
|
|
2213
|
+
"startLine": 1
|
|
2214
|
+
},
|
|
2215
|
+
"insertedContent": {
|
|
2216
|
+
"text": "passport@0.6.0"
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
]
|
|
2220
|
+
}
|
|
2221
|
+
]
|
|
2222
|
+
}
|
|
2223
|
+
]
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
"ruleId": "SNYK-JS-PATHPARSE-1077067",
|
|
2227
|
+
"level": "warning",
|
|
2228
|
+
"message": {
|
|
2229
|
+
"text": "This file introduces a vulnerable path-parse package with a medium severity vulnerability."
|
|
2230
|
+
},
|
|
2231
|
+
"locations": [
|
|
2232
|
+
{
|
|
2233
|
+
"physicalLocation": {
|
|
2234
|
+
"artifactLocation": {
|
|
2235
|
+
"uri": "package.json"
|
|
2236
|
+
},
|
|
2237
|
+
"region": {
|
|
2238
|
+
"startLine": 1
|
|
2239
|
+
}
|
|
2240
|
+
},
|
|
2241
|
+
"logicalLocations": [
|
|
2242
|
+
{
|
|
2243
|
+
"fullyQualifiedName": "path-parse@1.0.6"
|
|
2244
|
+
}
|
|
2245
|
+
]
|
|
2246
|
+
}
|
|
2247
|
+
]
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
"ruleId": "SNYK-JS-PATHTOREGEXP-7925106",
|
|
2251
|
+
"level": "warning",
|
|
2252
|
+
"message": {
|
|
2253
|
+
"text": "This file introduces a vulnerable path-to-regexp package with a medium severity vulnerability."
|
|
2254
|
+
},
|
|
2255
|
+
"locations": [
|
|
2256
|
+
{
|
|
2257
|
+
"physicalLocation": {
|
|
2258
|
+
"artifactLocation": {
|
|
2259
|
+
"uri": "package.json"
|
|
2260
|
+
},
|
|
2261
|
+
"region": {
|
|
2262
|
+
"startLine": 1
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
"logicalLocations": [
|
|
2266
|
+
{
|
|
2267
|
+
"fullyQualifiedName": "path-to-regexp@0.1.7"
|
|
2268
|
+
}
|
|
2269
|
+
]
|
|
2270
|
+
}
|
|
2271
|
+
],
|
|
2272
|
+
"fixes": [
|
|
2273
|
+
{
|
|
2274
|
+
"description": {
|
|
2275
|
+
"text": "Upgrade to express@4.20.0"
|
|
2276
|
+
},
|
|
2277
|
+
"artifactChanges": [
|
|
2278
|
+
{
|
|
2279
|
+
"artifactLocation": {
|
|
2280
|
+
"uri": "package.json"
|
|
2281
|
+
},
|
|
2282
|
+
"replacements": [
|
|
2283
|
+
{
|
|
2284
|
+
"deletedRegion": {
|
|
2285
|
+
"startLine": 1
|
|
2286
|
+
},
|
|
2287
|
+
"insertedContent": {
|
|
2288
|
+
"text": "express@4.20.0"
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
]
|
|
2292
|
+
}
|
|
2293
|
+
]
|
|
2294
|
+
}
|
|
2295
|
+
]
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
"ruleId": "SNYK-JS-PATHTOREGEXP-8482416",
|
|
2299
|
+
"level": "warning",
|
|
2300
|
+
"message": {
|
|
2301
|
+
"text": "This file introduces a vulnerable path-to-regexp package with a medium severity vulnerability."
|
|
2302
|
+
},
|
|
2303
|
+
"locations": [
|
|
2304
|
+
{
|
|
2305
|
+
"physicalLocation": {
|
|
2306
|
+
"artifactLocation": {
|
|
2307
|
+
"uri": "package.json"
|
|
2308
|
+
},
|
|
2309
|
+
"region": {
|
|
2310
|
+
"startLine": 1
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2313
|
+
"logicalLocations": [
|
|
2314
|
+
{
|
|
2315
|
+
"fullyQualifiedName": "path-to-regexp@0.1.7"
|
|
2316
|
+
}
|
|
2317
|
+
]
|
|
2318
|
+
}
|
|
2319
|
+
],
|
|
2320
|
+
"fixes": [
|
|
2321
|
+
{
|
|
2322
|
+
"description": {
|
|
2323
|
+
"text": "Upgrade to express@4.21.2"
|
|
2324
|
+
},
|
|
2325
|
+
"artifactChanges": [
|
|
2326
|
+
{
|
|
2327
|
+
"artifactLocation": {
|
|
2328
|
+
"uri": "package.json"
|
|
2329
|
+
},
|
|
2330
|
+
"replacements": [
|
|
2331
|
+
{
|
|
2332
|
+
"deletedRegion": {
|
|
2333
|
+
"startLine": 1
|
|
2334
|
+
},
|
|
2335
|
+
"insertedContent": {
|
|
2336
|
+
"text": "express@4.21.2"
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
]
|
|
2340
|
+
}
|
|
2341
|
+
]
|
|
2342
|
+
}
|
|
2343
|
+
]
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
"ruleId": "SNYK-JS-QS-3153490",
|
|
2347
|
+
"level": "error",
|
|
2348
|
+
"message": {
|
|
2349
|
+
"text": "This file introduces a vulnerable qs package with a high severity vulnerability."
|
|
2350
|
+
},
|
|
2351
|
+
"locations": [
|
|
2352
|
+
{
|
|
2353
|
+
"physicalLocation": {
|
|
2354
|
+
"artifactLocation": {
|
|
2355
|
+
"uri": "package.json"
|
|
2356
|
+
},
|
|
2357
|
+
"region": {
|
|
2358
|
+
"startLine": 1
|
|
2359
|
+
}
|
|
2360
|
+
},
|
|
2361
|
+
"logicalLocations": [
|
|
2362
|
+
{
|
|
2363
|
+
"fullyQualifiedName": "qs@6.7.0"
|
|
2364
|
+
}
|
|
2365
|
+
]
|
|
2366
|
+
}
|
|
2367
|
+
],
|
|
2368
|
+
"fixes": [
|
|
2369
|
+
{
|
|
2370
|
+
"description": {
|
|
2371
|
+
"text": "Upgrade to body-parser@1.19.2"
|
|
2372
|
+
},
|
|
2373
|
+
"artifactChanges": [
|
|
2374
|
+
{
|
|
2375
|
+
"artifactLocation": {
|
|
2376
|
+
"uri": "package.json"
|
|
2377
|
+
},
|
|
2378
|
+
"replacements": [
|
|
2379
|
+
{
|
|
2380
|
+
"deletedRegion": {
|
|
2381
|
+
"startLine": 1
|
|
2382
|
+
},
|
|
2383
|
+
"insertedContent": {
|
|
2384
|
+
"text": "body-parser@1.19.2"
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
]
|
|
2388
|
+
}
|
|
2389
|
+
]
|
|
2390
|
+
}
|
|
2391
|
+
]
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
"ruleId": "SNYK-JS-REDIS-1255645",
|
|
2395
|
+
"level": "warning",
|
|
2396
|
+
"message": {
|
|
2397
|
+
"text": "This file introduces a vulnerable redis package with a medium severity vulnerability."
|
|
2398
|
+
},
|
|
2399
|
+
"locations": [
|
|
2400
|
+
{
|
|
2401
|
+
"physicalLocation": {
|
|
2402
|
+
"artifactLocation": {
|
|
2403
|
+
"uri": "package.json"
|
|
2404
|
+
},
|
|
2405
|
+
"region": {
|
|
2406
|
+
"startLine": 1
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2409
|
+
"logicalLocations": [
|
|
2410
|
+
{
|
|
2411
|
+
"fullyQualifiedName": "redis@2.8.0"
|
|
2412
|
+
}
|
|
2413
|
+
]
|
|
2414
|
+
}
|
|
2415
|
+
],
|
|
2416
|
+
"fixes": [
|
|
2417
|
+
{
|
|
2418
|
+
"description": {
|
|
2419
|
+
"text": "Upgrade to redis@3.1.1"
|
|
2420
|
+
},
|
|
2421
|
+
"artifactChanges": [
|
|
2422
|
+
{
|
|
2423
|
+
"artifactLocation": {
|
|
2424
|
+
"uri": "package.json"
|
|
2425
|
+
},
|
|
2426
|
+
"replacements": [
|
|
2427
|
+
{
|
|
2428
|
+
"deletedRegion": {
|
|
2429
|
+
"startLine": 1
|
|
2430
|
+
},
|
|
2431
|
+
"insertedContent": {
|
|
2432
|
+
"text": "redis@3.1.1"
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
]
|
|
2436
|
+
}
|
|
2437
|
+
]
|
|
2438
|
+
}
|
|
2439
|
+
]
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
"ruleId": "SNYK-JS-SEMVER-3247795",
|
|
2443
|
+
"level": "error",
|
|
2444
|
+
"message": {
|
|
2445
|
+
"text": "This file introduces a vulnerable semver package with a high severity vulnerability."
|
|
2446
|
+
},
|
|
2447
|
+
"locations": [
|
|
2448
|
+
{
|
|
2449
|
+
"physicalLocation": {
|
|
2450
|
+
"artifactLocation": {
|
|
2451
|
+
"uri": "package.json"
|
|
2452
|
+
},
|
|
2453
|
+
"region": {
|
|
2454
|
+
"startLine": 1
|
|
2455
|
+
}
|
|
2456
|
+
},
|
|
2457
|
+
"logicalLocations": [
|
|
2458
|
+
{
|
|
2459
|
+
"fullyQualifiedName": "semver@5.7.0"
|
|
2460
|
+
}
|
|
2461
|
+
]
|
|
2462
|
+
}
|
|
2463
|
+
],
|
|
2464
|
+
"fixes": [
|
|
2465
|
+
{
|
|
2466
|
+
"description": {
|
|
2467
|
+
"text": "Upgrade to mongoose@5.7.0"
|
|
2468
|
+
},
|
|
2469
|
+
"artifactChanges": [
|
|
2470
|
+
{
|
|
2471
|
+
"artifactLocation": {
|
|
2472
|
+
"uri": "package.json"
|
|
2473
|
+
},
|
|
2474
|
+
"replacements": [
|
|
2475
|
+
{
|
|
2476
|
+
"deletedRegion": {
|
|
2477
|
+
"startLine": 1
|
|
2478
|
+
},
|
|
2479
|
+
"insertedContent": {
|
|
2480
|
+
"text": "mongoose@5.7.0"
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
]
|
|
2484
|
+
}
|
|
2485
|
+
]
|
|
2486
|
+
}
|
|
2487
|
+
]
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
"ruleId": "SNYK-JS-SEND-7926862",
|
|
2491
|
+
"level": "note",
|
|
2492
|
+
"message": {
|
|
2493
|
+
"text": "This file introduces a vulnerable send package with a low severity vulnerability."
|
|
2494
|
+
},
|
|
2495
|
+
"locations": [
|
|
2496
|
+
{
|
|
2497
|
+
"physicalLocation": {
|
|
2498
|
+
"artifactLocation": {
|
|
2499
|
+
"uri": "package.json"
|
|
2500
|
+
},
|
|
2501
|
+
"region": {
|
|
2502
|
+
"startLine": 1
|
|
2503
|
+
}
|
|
2504
|
+
},
|
|
2505
|
+
"logicalLocations": [
|
|
2506
|
+
{
|
|
2507
|
+
"fullyQualifiedName": "send@0.17.1"
|
|
2508
|
+
}
|
|
2509
|
+
]
|
|
2510
|
+
}
|
|
2511
|
+
],
|
|
2512
|
+
"fixes": [
|
|
2513
|
+
{
|
|
2514
|
+
"description": {
|
|
2515
|
+
"text": "Upgrade to express@4.20.0"
|
|
2516
|
+
},
|
|
2517
|
+
"artifactChanges": [
|
|
2518
|
+
{
|
|
2519
|
+
"artifactLocation": {
|
|
2520
|
+
"uri": "package.json"
|
|
2521
|
+
},
|
|
2522
|
+
"replacements": [
|
|
2523
|
+
{
|
|
2524
|
+
"deletedRegion": {
|
|
2525
|
+
"startLine": 1
|
|
2526
|
+
},
|
|
2527
|
+
"insertedContent": {
|
|
2528
|
+
"text": "express@4.20.0"
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
]
|
|
2532
|
+
}
|
|
2533
|
+
]
|
|
2534
|
+
}
|
|
2535
|
+
]
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
"ruleId": "SNYK-JS-SERVESTATIC-7926865",
|
|
2539
|
+
"level": "note",
|
|
2540
|
+
"message": {
|
|
2541
|
+
"text": "This file introduces a vulnerable serve-static package with a low severity vulnerability."
|
|
2542
|
+
},
|
|
2543
|
+
"locations": [
|
|
2544
|
+
{
|
|
2545
|
+
"physicalLocation": {
|
|
2546
|
+
"artifactLocation": {
|
|
2547
|
+
"uri": "package.json"
|
|
2548
|
+
},
|
|
2549
|
+
"region": {
|
|
2550
|
+
"startLine": 1
|
|
2551
|
+
}
|
|
2552
|
+
},
|
|
2553
|
+
"logicalLocations": [
|
|
2554
|
+
{
|
|
2555
|
+
"fullyQualifiedName": "serve-static@1.14.1"
|
|
2556
|
+
}
|
|
2557
|
+
]
|
|
2558
|
+
}
|
|
2559
|
+
],
|
|
2560
|
+
"fixes": [
|
|
2561
|
+
{
|
|
2562
|
+
"description": {
|
|
2563
|
+
"text": "Upgrade to express@4.20.0"
|
|
2564
|
+
},
|
|
2565
|
+
"artifactChanges": [
|
|
2566
|
+
{
|
|
2567
|
+
"artifactLocation": {
|
|
2568
|
+
"uri": "package.json"
|
|
2569
|
+
},
|
|
2570
|
+
"replacements": [
|
|
2571
|
+
{
|
|
2572
|
+
"deletedRegion": {
|
|
2573
|
+
"startLine": 1
|
|
2574
|
+
},
|
|
2575
|
+
"insertedContent": {
|
|
2576
|
+
"text": "express@4.20.0"
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
]
|
|
2580
|
+
}
|
|
2581
|
+
]
|
|
2582
|
+
}
|
|
2583
|
+
]
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
"ruleId": "SNYK-JS-XML2JS-5414874",
|
|
2587
|
+
"level": "warning",
|
|
2588
|
+
"message": {
|
|
2589
|
+
"text": "This file introduces a vulnerable xml2js package with a medium severity vulnerability."
|
|
2590
|
+
},
|
|
2591
|
+
"locations": [
|
|
2592
|
+
{
|
|
2593
|
+
"physicalLocation": {
|
|
2594
|
+
"artifactLocation": {
|
|
2595
|
+
"uri": "package.json"
|
|
2596
|
+
},
|
|
2597
|
+
"region": {
|
|
2598
|
+
"startLine": 1
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
"logicalLocations": [
|
|
2602
|
+
{
|
|
2603
|
+
"fullyQualifiedName": "xml2js@0.4.19"
|
|
2604
|
+
}
|
|
2605
|
+
]
|
|
2606
|
+
}
|
|
2607
|
+
],
|
|
2608
|
+
"fixes": [
|
|
2609
|
+
{
|
|
2610
|
+
"description": {
|
|
2611
|
+
"text": "Upgrade to aws-sdk@2.1354.0"
|
|
2612
|
+
},
|
|
2613
|
+
"artifactChanges": [
|
|
2614
|
+
{
|
|
2615
|
+
"artifactLocation": {
|
|
2616
|
+
"uri": "package.json"
|
|
2617
|
+
},
|
|
2618
|
+
"replacements": [
|
|
2619
|
+
{
|
|
2620
|
+
"deletedRegion": {
|
|
2621
|
+
"startLine": 1
|
|
2622
|
+
},
|
|
2623
|
+
"insertedContent": {
|
|
2624
|
+
"text": "aws-sdk@2.1354.0"
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
]
|
|
2628
|
+
}
|
|
2629
|
+
]
|
|
2630
|
+
}
|
|
2631
|
+
]
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
"ruleId": "SNYK-JS-Y18N-1021887",
|
|
2635
|
+
"level": "error",
|
|
2636
|
+
"message": {
|
|
2637
|
+
"text": "This file introduces a vulnerable y18n package with a high severity vulnerability."
|
|
2638
|
+
},
|
|
2639
|
+
"locations": [
|
|
2640
|
+
{
|
|
2641
|
+
"physicalLocation": {
|
|
2642
|
+
"artifactLocation": {
|
|
2643
|
+
"uri": "package.json"
|
|
2644
|
+
},
|
|
2645
|
+
"region": {
|
|
2646
|
+
"startLine": 1
|
|
2647
|
+
}
|
|
2648
|
+
},
|
|
2649
|
+
"logicalLocations": [
|
|
2650
|
+
{
|
|
2651
|
+
"fullyQualifiedName": "y18n@3.2.1"
|
|
2652
|
+
}
|
|
2653
|
+
]
|
|
2654
|
+
}
|
|
2655
|
+
]
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
"ruleId": "SNYK-JS-YARGSPARSER-560381",
|
|
2659
|
+
"level": "warning",
|
|
2660
|
+
"message": {
|
|
2661
|
+
"text": "This file introduces a vulnerable yargs-parser package with a medium severity vulnerability."
|
|
2662
|
+
},
|
|
2663
|
+
"locations": [
|
|
2664
|
+
{
|
|
2665
|
+
"physicalLocation": {
|
|
2666
|
+
"artifactLocation": {
|
|
2667
|
+
"uri": "package.json"
|
|
2668
|
+
},
|
|
2669
|
+
"region": {
|
|
2670
|
+
"startLine": 1
|
|
2671
|
+
}
|
|
2672
|
+
},
|
|
2673
|
+
"logicalLocations": [
|
|
2674
|
+
{
|
|
2675
|
+
"fullyQualifiedName": "yargs-parser@2.4.1"
|
|
2676
|
+
}
|
|
2677
|
+
]
|
|
2678
|
+
}
|
|
2679
|
+
]
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
"ruleId": "snyk:lic:npm:jmespath:Apache-2.0",
|
|
2683
|
+
"level": "error",
|
|
2684
|
+
"message": {
|
|
2685
|
+
"text": "This file introduces a vulnerable jmespath package with a high severity vulnerability."
|
|
2686
|
+
},
|
|
2687
|
+
"locations": [
|
|
2688
|
+
{
|
|
2689
|
+
"physicalLocation": {
|
|
2690
|
+
"artifactLocation": {
|
|
2691
|
+
"uri": "package.json"
|
|
2692
|
+
},
|
|
2693
|
+
"region": {
|
|
2694
|
+
"startLine": 1
|
|
2695
|
+
}
|
|
2696
|
+
},
|
|
2697
|
+
"logicalLocations": [
|
|
2698
|
+
{
|
|
2699
|
+
"fullyQualifiedName": "jmespath@0.15.0"
|
|
2700
|
+
}
|
|
2701
|
+
]
|
|
2702
|
+
}
|
|
2703
|
+
]
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
"ruleId": "snyk:lic:npm:kareem:Apache-2.0",
|
|
2707
|
+
"level": "error",
|
|
2708
|
+
"message": {
|
|
2709
|
+
"text": "This file introduces a vulnerable kareem package with a high severity vulnerability."
|
|
2710
|
+
},
|
|
2711
|
+
"locations": [
|
|
2712
|
+
{
|
|
2713
|
+
"physicalLocation": {
|
|
2714
|
+
"artifactLocation": {
|
|
2715
|
+
"uri": "package.json"
|
|
2716
|
+
},
|
|
2717
|
+
"region": {
|
|
2718
|
+
"startLine": 1
|
|
2719
|
+
}
|
|
2720
|
+
},
|
|
2721
|
+
"logicalLocations": [
|
|
2722
|
+
{
|
|
2723
|
+
"fullyQualifiedName": "kareem@2.3.0"
|
|
2724
|
+
}
|
|
2725
|
+
]
|
|
2726
|
+
}
|
|
2727
|
+
]
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"ruleId": "snyk:lic:npm:mongodb-core:Apache-2.0",
|
|
2731
|
+
"level": "error",
|
|
2732
|
+
"message": {
|
|
2733
|
+
"text": "This file introduces a vulnerable mongodb-core package with a high severity vulnerability."
|
|
2734
|
+
},
|
|
2735
|
+
"locations": [
|
|
2736
|
+
{
|
|
2737
|
+
"physicalLocation": {
|
|
2738
|
+
"artifactLocation": {
|
|
2739
|
+
"uri": "package.json"
|
|
2740
|
+
},
|
|
2741
|
+
"region": {
|
|
2742
|
+
"startLine": 1
|
|
2743
|
+
}
|
|
2744
|
+
},
|
|
2745
|
+
"logicalLocations": [
|
|
2746
|
+
{
|
|
2747
|
+
"fullyQualifiedName": "mongodb-core@3.2.7"
|
|
2748
|
+
}
|
|
2749
|
+
]
|
|
2750
|
+
}
|
|
2751
|
+
]
|
|
2752
|
+
},
|
|
2753
|
+
{
|
|
2754
|
+
"ruleId": "snyk:lic:npm:mongodb:Apache-2.0",
|
|
2755
|
+
"level": "error",
|
|
2756
|
+
"message": {
|
|
2757
|
+
"text": "This file introduces a vulnerable mongodb package with a high severity vulnerability."
|
|
2758
|
+
},
|
|
2759
|
+
"locations": [
|
|
2760
|
+
{
|
|
2761
|
+
"physicalLocation": {
|
|
2762
|
+
"artifactLocation": {
|
|
2763
|
+
"uri": "package.json"
|
|
2764
|
+
},
|
|
2765
|
+
"region": {
|
|
2766
|
+
"startLine": 1
|
|
2767
|
+
}
|
|
2768
|
+
},
|
|
2769
|
+
"logicalLocations": [
|
|
2770
|
+
{
|
|
2771
|
+
"fullyQualifiedName": "mongodb@3.2.7"
|
|
2772
|
+
}
|
|
2773
|
+
]
|
|
2774
|
+
}
|
|
2775
|
+
]
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
"ruleId": "snyk:lic:npm:mongoose-legacy-pluralize:Apache-2.0",
|
|
2779
|
+
"level": "error",
|
|
2780
|
+
"message": {
|
|
2781
|
+
"text": "This file introduces a vulnerable mongoose-legacy-pluralize package with a high severity vulnerability."
|
|
2782
|
+
},
|
|
2783
|
+
"locations": [
|
|
2784
|
+
{
|
|
2785
|
+
"physicalLocation": {
|
|
2786
|
+
"artifactLocation": {
|
|
2787
|
+
"uri": "package.json"
|
|
2788
|
+
},
|
|
2789
|
+
"region": {
|
|
2790
|
+
"startLine": 1
|
|
2791
|
+
}
|
|
2792
|
+
},
|
|
2793
|
+
"logicalLocations": [
|
|
2794
|
+
{
|
|
2795
|
+
"fullyQualifiedName": "mongoose-legacy-pluralize@1.0.2"
|
|
2796
|
+
}
|
|
2797
|
+
]
|
|
2798
|
+
}
|
|
2799
|
+
]
|
|
2800
|
+
},
|
|
2801
|
+
{
|
|
2802
|
+
"ruleId": "snyk:lic:npm:require_optional:Apache-2.0",
|
|
2803
|
+
"level": "error",
|
|
2804
|
+
"message": {
|
|
2805
|
+
"text": "This file introduces a vulnerable require_optional package with a high severity vulnerability."
|
|
2806
|
+
},
|
|
2807
|
+
"locations": [
|
|
2808
|
+
{
|
|
2809
|
+
"physicalLocation": {
|
|
2810
|
+
"artifactLocation": {
|
|
2811
|
+
"uri": "package.json"
|
|
2812
|
+
},
|
|
2813
|
+
"region": {
|
|
2814
|
+
"startLine": 1
|
|
2815
|
+
}
|
|
2816
|
+
},
|
|
2817
|
+
"logicalLocations": [
|
|
2818
|
+
{
|
|
2819
|
+
"fullyQualifiedName": "require_optional@1.0.1"
|
|
2820
|
+
}
|
|
2821
|
+
]
|
|
2822
|
+
}
|
|
2823
|
+
]
|
|
2824
|
+
},
|
|
2825
|
+
{
|
|
2826
|
+
"ruleId": "snyk:lic:npm:rx-lite:Apache-2.0",
|
|
2827
|
+
"level": "error",
|
|
2828
|
+
"message": {
|
|
2829
|
+
"text": "This file introduces a vulnerable rx-lite package with a high severity vulnerability."
|
|
2830
|
+
},
|
|
2831
|
+
"locations": [
|
|
2832
|
+
{
|
|
2833
|
+
"physicalLocation": {
|
|
2834
|
+
"artifactLocation": {
|
|
2835
|
+
"uri": "package.json"
|
|
2836
|
+
},
|
|
2837
|
+
"region": {
|
|
2838
|
+
"startLine": 1
|
|
2839
|
+
}
|
|
2840
|
+
},
|
|
2841
|
+
"logicalLocations": [
|
|
2842
|
+
{
|
|
2843
|
+
"fullyQualifiedName": "rx-lite@3.1.2"
|
|
2844
|
+
}
|
|
2845
|
+
]
|
|
2846
|
+
}
|
|
2847
|
+
]
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
"ruleId": "snyk:lic:npm:spdx-correct:Apache-2.0",
|
|
2851
|
+
"level": "error",
|
|
2852
|
+
"message": {
|
|
2853
|
+
"text": "This file introduces a vulnerable spdx-correct package with a high severity vulnerability."
|
|
2854
|
+
},
|
|
2855
|
+
"locations": [
|
|
2856
|
+
{
|
|
2857
|
+
"physicalLocation": {
|
|
2858
|
+
"artifactLocation": {
|
|
2859
|
+
"uri": "package.json"
|
|
2860
|
+
},
|
|
2861
|
+
"region": {
|
|
2862
|
+
"startLine": 1
|
|
2863
|
+
}
|
|
2864
|
+
},
|
|
2865
|
+
"logicalLocations": [
|
|
2866
|
+
{
|
|
2867
|
+
"fullyQualifiedName": "spdx-correct@3.1.0"
|
|
2868
|
+
}
|
|
2869
|
+
]
|
|
2870
|
+
}
|
|
2871
|
+
]
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
"ruleId": "snyk:lic:npm:validate-npm-package-license:Apache-2.0",
|
|
2875
|
+
"level": "error",
|
|
2876
|
+
"message": {
|
|
2877
|
+
"text": "This file introduces a vulnerable validate-npm-package-license package with a high severity vulnerability."
|
|
2878
|
+
},
|
|
2879
|
+
"locations": [
|
|
2880
|
+
{
|
|
2881
|
+
"physicalLocation": {
|
|
2882
|
+
"artifactLocation": {
|
|
2883
|
+
"uri": "package.json"
|
|
2884
|
+
},
|
|
2885
|
+
"region": {
|
|
2886
|
+
"startLine": 1
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
"logicalLocations": [
|
|
2890
|
+
{
|
|
2891
|
+
"fullyQualifiedName": "validate-npm-package-license@3.0.4"
|
|
2892
|
+
}
|
|
2893
|
+
]
|
|
2894
|
+
}
|
|
2895
|
+
]
|
|
2896
|
+
}
|
|
2897
|
+
]
|
|
2898
|
+
}
|
|
2899
|
+
]
|
|
2900
|
+
}
|