@fabasoad/sarif-to-slack 0.2.0 → 0.2.2
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/workflows/release.yml +3 -1
- package/.github/workflows/send-sarif-to-slack.yml +214 -0
- package/.pre-commit-config.yaml +3 -3
- package/.tool-versions +1 -1
- package/Makefile +9 -2
- package/README.md +1 -1
- package/dist/Logger.js +15 -6
- package/dist/Processors.js +2 -32
- package/dist/SarifToSlackService.d.ts.map +1 -1
- package/dist/SarifToSlackService.js +13 -6
- package/dist/SlackMessageBuilder.js +46 -52
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/model/SarifModelPerRun.d.ts +2 -0
- package/dist/model/SarifModelPerRun.d.ts.map +1 -0
- package/dist/model/SarifModelPerRun.js +90 -0
- package/dist/model/SarifModelPerSarif.d.ts +2 -0
- package/dist/model/SarifModelPerSarif.d.ts.map +1 -0
- package/dist/model/SarifModelPerSarif.js +102 -0
- package/dist/model/types.d.ts +2 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/model/types.js +49 -0
- package/dist/sarif-to-slack.d.ts +96 -12
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types.d.ts +87 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +66 -9
- package/dist/utils/SarifUtils.d.ts +2 -0
- package/dist/utils/SarifUtils.d.ts.map +1 -0
- package/dist/utils/SarifUtils.js +46 -0
- package/dist/utils/SortUtils.d.ts +2 -0
- package/dist/utils/SortUtils.d.ts.map +1 -0
- package/dist/utils/SortUtils.js +20 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +11 -4
- package/etc/sarif-to-slack.api.md +32 -7
- package/jest.config.json +4 -4
- package/package.json +9 -7
- package/scripts/save-version.sh +9 -2
- package/src/Logger.ts +20 -17
- package/src/Processors.ts +1 -33
- package/src/SarifToSlackService.ts +13 -6
- package/src/SlackMessageBuilder.ts +78 -63
- package/src/index.ts +16 -6
- package/src/model/SarifModelPerRun.ts +120 -0
- package/src/model/SarifModelPerSarif.ts +126 -0
- package/src/model/types.ts +50 -0
- package/src/types.ts +91 -11
- package/src/utils/SarifUtils.ts +62 -0
- package/src/utils/SortUtils.ts +33 -0
- package/src/version.ts +10 -3
- 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 -42
- package/tests/integration/SendSarifToSlack.spec.ts +80 -0
|
@@ -0,0 +1,274 @@
|
|
|
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": 1
|
|
11
|
+
},
|
|
12
|
+
"rules": [
|
|
13
|
+
{
|
|
14
|
+
"id": "SNYK-JAVA-COMMONSCOLLECTIONS-30078",
|
|
15
|
+
"shortDescription": {
|
|
16
|
+
"text": "High severity - Deserialization of Untrusted Data vulnerability in commons-collections:commons-collections"
|
|
17
|
+
},
|
|
18
|
+
"fullDescription": {
|
|
19
|
+
"text": "(CVE-2015-7501) commons-collections:commons-collections@3.2.1"
|
|
20
|
+
},
|
|
21
|
+
"help": {
|
|
22
|
+
"text": "",
|
|
23
|
+
"markdown": "* Package Manager: gradle\n* Vulnerable module: commons-collections:commons-collections\n* Introduced through: demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\n# Overview\n[commons-collections:commons-collections](https://mvnrepository.com/artifact/commons-collections/commons-collections) is a library which contains types that extend and augment the Java Collections Framework.\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data. It is possible to execute arbitrary Java code with the `InvokerTransformer` serializable collections . The `sun.reflect.annotation.AnnotationInvocationHandler#readObject` method invokes `#entrySet` and `#get` on a deserialized collection. If an attacker has to ability to send serialized data (JMX, RMI, EJB) to an application using the `common-collections` library, it is possible to combine the aforementioned methods to execute arbitrary code on the application.\r\n\r\n\r\n`org.apache.commons:commons-collections` is no longer supported and has been moved to `org.apache.commons:commons-collections4`. We recommend moving to the new artifact if possible.\r\n\r\n**Note:** the scope of CVE-2015-7501 is limited to the Red Hat JBoss products.\n\n**NOTE:** \r\n\r\nThis vulnerability has also been identified as: [CVE-2015-4852](https://security.snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-6056408)\n\n\n# Details\n\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like _Remote Method Invocation (RMI)_, _Java Management Extension (JMX)_, _Java Messaging System (JMS)_, _Action Message Format (AMF)_, _Java Server Faces (JSF) ViewState_, etc.\n\n_Deserialization of untrusted data_ ([CWE-502](https://cwe.mitre.org/data/definitions/502.html)), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution.\n\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a [popular library (Apache Commons Collection)](https://snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\n\n \nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\n \n\n> Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application, an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\n\n \n# Remediation\nUpgrade `commons-collections:commons-collections` to version 3.2.2 or higher.\n# References\n- [FoxGloveSecurity Blog](http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/)\n- [GitHub Commit](https://github.com/apache/commons-collections/commit/e585cd0433ae4cfbc56e58572b9869bd0c86b611)\n- [Jira Issue](https://issues.apache.org/jira/browse/COLLECTIONS-580)\n- [PoC](https://github.com/ianxtianxt/CVE-2015-7501)\n"
|
|
24
|
+
},
|
|
25
|
+
"properties": {
|
|
26
|
+
"tags": [
|
|
27
|
+
"security",
|
|
28
|
+
"CWE-502",
|
|
29
|
+
"gradle"
|
|
30
|
+
],
|
|
31
|
+
"cvssv3_baseScore": 9.8,
|
|
32
|
+
"security-severity": "9.8"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "SNYK-JAVA-COMMONSCOLLECTIONS-472711",
|
|
37
|
+
"shortDescription": {
|
|
38
|
+
"text": "Medium severity - Deserialization of Untrusted Data vulnerability in commons-collections:commons-collections"
|
|
39
|
+
},
|
|
40
|
+
"fullDescription": {
|
|
41
|
+
"text": "(CVE-2015-6420) commons-collections:commons-collections@3.2.1"
|
|
42
|
+
},
|
|
43
|
+
"help": {
|
|
44
|
+
"text": "",
|
|
45
|
+
"markdown": "* Package Manager: gradle\n* Vulnerable module: commons-collections:commons-collections\n* Introduced through: demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\n# Overview\n\n[commons-collections:commons-collections](https://mvnrepository.com/artifact/commons-collections/commons-collections) is a library which contains types that extend and augment the Java Collections Framework.\n\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data.\nVersions of commons-collections prior to `3.2.2` do not prevent deserialization of the class `org.apache.commons.collections.functors.InvokerTransformer`. This could be leveraged by an attacker as a gadget within a vulnerable application which deserializes user input to execute arbitrary code. \r\n\r\nVersions of commons-collections from 3.2.2 onwards will throw an `UnsupportedOperationException` error when attempts are made to deserialize InvokerTransformer instances to prevent potential remote code execution exploits.\r\n\r\n*Note:* `org.apache.commons:commons-collections` is no longer supported and has been moved to `org.apache.commons:commons-collections4` we recommend moving to the new artifact if possible.\r\n\r\n# PoC \r\n\r\n```\r\n/*\r\n\tGadget chain:\r\n\t\tObjectInputStream.readObject()\r\n\t\t\tAnnotationInvocationHandler.readObject()\r\n\t\t\t\tMap(Proxy).entrySet()\r\n\t\t\t\t\tAnnotationInvocationHandler.invoke()\r\n\t\t\t\t\t\tLazyMap.get()\r\n\t\t\t\t\t\t\tChainedTransformer.transform()\r\n\t\t\t\t\t\t\t\tConstantTransformer.transform()\r\n\t\t\t\t\t\t\t\tInvokerTransformer.transform()\r\n\t\t\t\t\t\t\t\t\tMethod.invoke()\r\n\t\t\t\t\t\t\t\t\t\tClass.getMethod()\r\n\t\t\t\t\t\t\t\tInvokerTransformer.transform()\r\n\t\t\t\t\t\t\t\t\tMethod.invoke()\r\n\t\t\t\t\t\t\t\t\t\tRuntime.getRuntime()\r\n\t\t\t\t\t\t\t\tInvokerTransformer.transform()\r\n\t\t\t\t\t\t\t\t\tMethod.invoke()\r\n\t\t\t\t\t\t\t\t\t\tRuntime.exec()\r\n\tRequires:\r\n\t\tcommons-collections\r\n */\r\n```\n\n# Details\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like _Remote Method Invocation (RMI)_, _Java Management Extension (JMX)_, _Java Messaging System (JMS)_, _Action Message Format (AMF)_, _Java Server Faces (JSF) ViewState_, etc.\r\n\r\n \r\n\r\n_Deserialization of untrusted data_ ([CWE-502](https://cwe.mitre.org/data/definitions/502.html)), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution.\r\n\r\n \r\n\r\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a [popular library (Apache Commons Collection)](https://snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\r\n\r\n \r\n\r\nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\r\n\r\n \r\n\r\n> Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\r\n\r\n- Apache Blog\r\n\r\n \r\n\r\nThe vulnerability, also know as _Mad Gadget_\r\n\r\n> Mad Gadget is one of the most pernicious vulnerabilities we’ve seen. By merely existing on the Java classpath, seven “gadget” classes in Apache Commons Collections (versions 3.0, 3.1, 3.2, 3.2.1, and 4.0) make object deserialization for the entire JVM process Turing complete with an exec function. Since many business applications use object deserialization to send messages across the network, it would be like hiring a bank teller who was trained to hand over all the money in the vault if asked to do so politely, and then entrusting that teller with the key. The only thing that would keep a bank safe in such a circumstance is that most people wouldn’t consider asking such a question.\r\n\r\n- Google\n\n\n# Remediation\n\nUpgrade `commons-collections:commons-collections` to version 3.2.2 or higher.\n\n\n# References\n\n- [GitHub Commit](https://github.com/apache/commons-collections/commit/5ec476b0b756852db865b2e442180f091f8209ee)\n\n- [GitHub PR](https://github.com/apache/commons-collections/pull/18)\n\n- [Jira Ticket](https://issues.apache.org/jira/browse/COLLECTIONS-580)\n"
|
|
46
|
+
},
|
|
47
|
+
"properties": {
|
|
48
|
+
"tags": [
|
|
49
|
+
"security",
|
|
50
|
+
"CWE-502",
|
|
51
|
+
"gradle"
|
|
52
|
+
],
|
|
53
|
+
"cvssv3_baseScore": 5.6,
|
|
54
|
+
"security-severity": "5.6"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "SNYK-JAVA-COMMONSCOLLECTIONS-6056408",
|
|
59
|
+
"shortDescription": {
|
|
60
|
+
"text": "High severity - Deserialization of Untrusted Data vulnerability in commons-collections:commons-collections"
|
|
61
|
+
},
|
|
62
|
+
"fullDescription": {
|
|
63
|
+
"text": "(CVE-2015-4852) commons-collections:commons-collections@3.2.1"
|
|
64
|
+
},
|
|
65
|
+
"help": {
|
|
66
|
+
"text": "",
|
|
67
|
+
"markdown": "* Package Manager: gradle\n* Vulnerable module: commons-collections:commons-collections\n* Introduced through: demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\n# Overview\n[commons-collections:commons-collections](https://mvnrepository.com/artifact/commons-collections/commons-collections) is a library which contains types that extend and augment the Java Collections Framework.\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data. It is possible to execute arbitrary Java code with the `InvokerTransformer` serializable collections . The `sun.reflect.annotation.AnnotationInvocationHandler#readObject` method invokes `#entrySet` and `#get` on a deserialized collection. If an attacker has to ability to send serialized data (JMX, RMI, EJB) to an application using the `common-collections` library, it is possible to combine the aforementioned methods to execute arbitrary code on the application.\r\n\r\n`org.apache.commons:commons-collections` is no longer supported and has been moved to `org.apache.commons:commons-collections4`. We recommend moving to the new artifact if possible.\r\n\r\n**Note:** the scope of CVE-2015-4852 is limited to the WebLogic Server product.\n\n**NOTE:** \r\n\r\nThis vulnerability has also been identified as: [CVE-2015-7501](https://security.snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078)\n\n\n# Details\n\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like _Remote Method Invocation (RMI)_, _Java Management Extension (JMX)_, _Java Messaging System (JMS)_, _Action Message Format (AMF)_, _Java Server Faces (JSF) ViewState_, etc.\n\n_Deserialization of untrusted data_ ([CWE-502](https://cwe.mitre.org/data/definitions/502.html)), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution.\n\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a [popular library (Apache Commons Collection)](https://snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\n\n \nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\n \n\n> Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application, an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\n\n \n# Remediation\nUpgrade `commons-collections:commons-collections` to version 3.2.2 or higher.\n# References\n- [FoxGloveSecurity Blog](http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/)\n- [GitHub Commit](https://github.com/apache/commons-collections/commit/e585cd0433ae4cfbc56e58572b9869bd0c86b611)\n- [Jira Issue](https://issues.apache.org/jira/browse/COLLECTIONS-580)\n- [PoC](https://github.com/ianxtianxt/CVE-2015-7501)\n- [Exploit DB](https://www.exploit-db.com/exploits/46628)\n- [CISA - Known Exploited Vulnerabilities](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)\n"
|
|
68
|
+
},
|
|
69
|
+
"properties": {
|
|
70
|
+
"tags": [
|
|
71
|
+
"security",
|
|
72
|
+
"CWE-502",
|
|
73
|
+
"gradle"
|
|
74
|
+
],
|
|
75
|
+
"cvssv3_baseScore": 9.8,
|
|
76
|
+
"security-severity": "9.8"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "snyk:lic:maven:commons-collections:commons-collections:Apache-2.0",
|
|
81
|
+
"shortDescription": {
|
|
82
|
+
"text": "High severity - Apache-2.0 license vulnerability in commons-collections:commons-collections"
|
|
83
|
+
},
|
|
84
|
+
"fullDescription": {
|
|
85
|
+
"text": "commons-collections:commons-collections@3.2.1"
|
|
86
|
+
},
|
|
87
|
+
"help": {
|
|
88
|
+
"text": "",
|
|
89
|
+
"markdown": "* Package Manager: gradle\n* Module: commons-collections:commons-collections\n* Introduced through: demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\nApache-2.0 license"
|
|
90
|
+
},
|
|
91
|
+
"properties": {
|
|
92
|
+
"tags": [
|
|
93
|
+
"security",
|
|
94
|
+
"gradle"
|
|
95
|
+
],
|
|
96
|
+
"security-severity": "undefined"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"results": [
|
|
103
|
+
{
|
|
104
|
+
"ruleId": "SNYK-JAVA-COMMONSCOLLECTIONS-30078",
|
|
105
|
+
"level": "error",
|
|
106
|
+
"message": {
|
|
107
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a high severity vulnerability."
|
|
108
|
+
},
|
|
109
|
+
"locations": [
|
|
110
|
+
{
|
|
111
|
+
"physicalLocation": {
|
|
112
|
+
"artifactLocation": {
|
|
113
|
+
"uri": "build.gradle"
|
|
114
|
+
},
|
|
115
|
+
"region": {
|
|
116
|
+
"startLine": 1
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"logicalLocations": [
|
|
120
|
+
{
|
|
121
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"fixes": [
|
|
127
|
+
{
|
|
128
|
+
"description": {
|
|
129
|
+
"text": "Upgrade to commons-collections:commons-collections@3.2.2"
|
|
130
|
+
},
|
|
131
|
+
"artifactChanges": [
|
|
132
|
+
{
|
|
133
|
+
"artifactLocation": {
|
|
134
|
+
"uri": "build.gradle"
|
|
135
|
+
},
|
|
136
|
+
"replacements": [
|
|
137
|
+
{
|
|
138
|
+
"deletedRegion": {
|
|
139
|
+
"startLine": 1
|
|
140
|
+
},
|
|
141
|
+
"insertedContent": {
|
|
142
|
+
"text": "commons-collections:commons-collections@3.2.2"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"ruleId": "SNYK-JAVA-COMMONSCOLLECTIONS-472711",
|
|
153
|
+
"level": "warning",
|
|
154
|
+
"message": {
|
|
155
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a medium severity vulnerability."
|
|
156
|
+
},
|
|
157
|
+
"locations": [
|
|
158
|
+
{
|
|
159
|
+
"physicalLocation": {
|
|
160
|
+
"artifactLocation": {
|
|
161
|
+
"uri": "build.gradle"
|
|
162
|
+
},
|
|
163
|
+
"region": {
|
|
164
|
+
"startLine": 1
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"logicalLocations": [
|
|
168
|
+
{
|
|
169
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"fixes": [
|
|
175
|
+
{
|
|
176
|
+
"description": {
|
|
177
|
+
"text": "Upgrade to commons-collections:commons-collections@3.2.2"
|
|
178
|
+
},
|
|
179
|
+
"artifactChanges": [
|
|
180
|
+
{
|
|
181
|
+
"artifactLocation": {
|
|
182
|
+
"uri": "build.gradle"
|
|
183
|
+
},
|
|
184
|
+
"replacements": [
|
|
185
|
+
{
|
|
186
|
+
"deletedRegion": {
|
|
187
|
+
"startLine": 1
|
|
188
|
+
},
|
|
189
|
+
"insertedContent": {
|
|
190
|
+
"text": "commons-collections:commons-collections@3.2.2"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"ruleId": "SNYK-JAVA-COMMONSCOLLECTIONS-6056408",
|
|
201
|
+
"level": "error",
|
|
202
|
+
"message": {
|
|
203
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a high severity vulnerability."
|
|
204
|
+
},
|
|
205
|
+
"locations": [
|
|
206
|
+
{
|
|
207
|
+
"physicalLocation": {
|
|
208
|
+
"artifactLocation": {
|
|
209
|
+
"uri": "build.gradle"
|
|
210
|
+
},
|
|
211
|
+
"region": {
|
|
212
|
+
"startLine": 1
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"logicalLocations": [
|
|
216
|
+
{
|
|
217
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"fixes": [
|
|
223
|
+
{
|
|
224
|
+
"description": {
|
|
225
|
+
"text": "Upgrade to commons-collections:commons-collections@3.2.2"
|
|
226
|
+
},
|
|
227
|
+
"artifactChanges": [
|
|
228
|
+
{
|
|
229
|
+
"artifactLocation": {
|
|
230
|
+
"uri": "build.gradle"
|
|
231
|
+
},
|
|
232
|
+
"replacements": [
|
|
233
|
+
{
|
|
234
|
+
"deletedRegion": {
|
|
235
|
+
"startLine": 1
|
|
236
|
+
},
|
|
237
|
+
"insertedContent": {
|
|
238
|
+
"text": "commons-collections:commons-collections@3.2.2"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"ruleId": "snyk:lic:maven:commons-collections:commons-collections:Apache-2.0",
|
|
249
|
+
"level": "error",
|
|
250
|
+
"message": {
|
|
251
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a high severity vulnerability."
|
|
252
|
+
},
|
|
253
|
+
"locations": [
|
|
254
|
+
{
|
|
255
|
+
"physicalLocation": {
|
|
256
|
+
"artifactLocation": {
|
|
257
|
+
"uri": "build.gradle"
|
|
258
|
+
},
|
|
259
|
+
"region": {
|
|
260
|
+
"startLine": 1
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"logicalLocations": [
|
|
264
|
+
{
|
|
265
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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": 6
|
|
11
|
+
},
|
|
12
|
+
"rules": [
|
|
13
|
+
{
|
|
14
|
+
"id": "SNYK-HEX-PAGINATOR-1086684",
|
|
15
|
+
"shortDescription": {
|
|
16
|
+
"text": "Critical severity - Remote Code Execution (RCE) vulnerability in paginator"
|
|
17
|
+
},
|
|
18
|
+
"fullDescription": {
|
|
19
|
+
"text": "(CVE-2020-15150) paginator@0.6.0"
|
|
20
|
+
},
|
|
21
|
+
"help": {
|
|
22
|
+
"text": "",
|
|
23
|
+
"markdown": "* Package Manager: hex\n* Vulnerable module: paginator\n* Introduced through: carafe@0.1.0 and paginator@0.6.0\n### Detailed paths\n* _Introduced through_: carafe@0.1.0 › paginator@0.6.0\n# Overview\n[paginator](https://hex.pm/packages/paginator) is a package that enables cursor-based pagination for Elixir Ecto.\n\nAffected versions of this package are vulnerable to Remote Code Execution (RCE) via `paginate()` function when untrusted input is passed from a remote user.\r\n\r\n# PoC\r\n```\r\ndefp rce_start_xcalc() do\r\n exploit = fn _, _ -> System.cmd(\"xcalc\", []); {:cont, []} end\r\n payload =\r\n exploit\r\n |> :erlang.term_to_binary()\r\n |> Base.url_encode64()\r\nend\r\n```\n# Remediation\nUpgrade `paginator` to version 1.0.0 or higher.\n# References\n- [GitHub PR](https://github.com/duffelhq/paginator/commit/bf45e92602e517c75aea0465efc35cd661d9ebf8)\n- [Research Blog Post](https://www.alphabot.com/security/blog/2020/elixir/Remote-code-execution-vulnerability-in-Elixir-based-Paginator-project.html)\n"
|
|
24
|
+
},
|
|
25
|
+
"properties": {
|
|
26
|
+
"tags": [
|
|
27
|
+
"security",
|
|
28
|
+
"CWE-94",
|
|
29
|
+
"hex"
|
|
30
|
+
],
|
|
31
|
+
"cvssv3_baseScore": 9.8,
|
|
32
|
+
"security-severity": "9.8"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"results": [
|
|
39
|
+
{
|
|
40
|
+
"ruleId": "SNYK-HEX-PAGINATOR-1086684",
|
|
41
|
+
"level": "error",
|
|
42
|
+
"message": {
|
|
43
|
+
"text": "This file introduces a vulnerable paginator package with a critical severity vulnerability."
|
|
44
|
+
},
|
|
45
|
+
"locations": [
|
|
46
|
+
{
|
|
47
|
+
"physicalLocation": {
|
|
48
|
+
"artifactLocation": {
|
|
49
|
+
"uri": "mix.exs"
|
|
50
|
+
},
|
|
51
|
+
"region": {
|
|
52
|
+
"startLine": 1
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"logicalLocations": [
|
|
56
|
+
{
|
|
57
|
+
"fullyQualifiedName": "paginator@0.6.0"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
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": 1
|
|
11
|
+
},
|
|
12
|
+
"rules": [
|
|
13
|
+
{
|
|
14
|
+
"id": "SNYK-JAVA-COMMONSCOLLECTIONS-30078",
|
|
15
|
+
"shortDescription": {
|
|
16
|
+
"text": "High severity - Deserialization of Untrusted Data vulnerability in commons-collections:commons-collections"
|
|
17
|
+
},
|
|
18
|
+
"fullDescription": {
|
|
19
|
+
"text": "(CVE-2015-7501) commons-collections:commons-collections@3.2.1"
|
|
20
|
+
},
|
|
21
|
+
"help": {
|
|
22
|
+
"text": "",
|
|
23
|
+
"markdown": "* Package Manager: maven\n* Vulnerable module: commons-collections:commons-collections\n* Introduced through: com.example:demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: com.example:demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\n# Overview\n[commons-collections:commons-collections](https://mvnrepository.com/artifact/commons-collections/commons-collections) is a library which contains types that extend and augment the Java Collections Framework.\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data. It is possible to execute arbitrary Java code with the `InvokerTransformer` serializable collections . The `sun.reflect.annotation.AnnotationInvocationHandler#readObject` method invokes `#entrySet` and `#get` on a deserialized collection. If an attacker has to ability to send serialized data (JMX, RMI, EJB) to an application using the `common-collections` library, it is possible to combine the aforementioned methods to execute arbitrary code on the application.\r\n\r\n\r\n`org.apache.commons:commons-collections` is no longer supported and has been moved to `org.apache.commons:commons-collections4`. We recommend moving to the new artifact if possible.\r\n\r\n**Note:** the scope of CVE-2015-7501 is limited to the Red Hat JBoss products.\n\n**NOTE:** \r\n\r\nThis vulnerability has also been identified as: [CVE-2015-4852](https://security.snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-6056408)\n\n\n# Details\n\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like _Remote Method Invocation (RMI)_, _Java Management Extension (JMX)_, _Java Messaging System (JMS)_, _Action Message Format (AMF)_, _Java Server Faces (JSF) ViewState_, etc.\n\n_Deserialization of untrusted data_ ([CWE-502](https://cwe.mitre.org/data/definitions/502.html)), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution.\n\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a [popular library (Apache Commons Collection)](https://snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\n\n \nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\n \n\n> Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application, an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\n\n \n# Remediation\nUpgrade `commons-collections:commons-collections` to version 3.2.2 or higher.\n# References\n- [FoxGloveSecurity Blog](http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/)\n- [GitHub Commit](https://github.com/apache/commons-collections/commit/e585cd0433ae4cfbc56e58572b9869bd0c86b611)\n- [Jira Issue](https://issues.apache.org/jira/browse/COLLECTIONS-580)\n- [PoC](https://github.com/ianxtianxt/CVE-2015-7501)\n"
|
|
24
|
+
},
|
|
25
|
+
"properties": {
|
|
26
|
+
"tags": [
|
|
27
|
+
"security",
|
|
28
|
+
"CWE-502",
|
|
29
|
+
"maven"
|
|
30
|
+
],
|
|
31
|
+
"cvssv3_baseScore": 9.8,
|
|
32
|
+
"security-severity": "9.8"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "SNYK-JAVA-COMMONSCOLLECTIONS-472711",
|
|
37
|
+
"shortDescription": {
|
|
38
|
+
"text": "Medium severity - Deserialization of Untrusted Data vulnerability in commons-collections:commons-collections"
|
|
39
|
+
},
|
|
40
|
+
"fullDescription": {
|
|
41
|
+
"text": "(CVE-2015-6420) commons-collections:commons-collections@3.2.1"
|
|
42
|
+
},
|
|
43
|
+
"help": {
|
|
44
|
+
"text": "",
|
|
45
|
+
"markdown": "* Package Manager: maven\n* Vulnerable module: commons-collections:commons-collections\n* Introduced through: com.example:demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: com.example:demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\n# Overview\n\n[commons-collections:commons-collections](https://mvnrepository.com/artifact/commons-collections/commons-collections) is a library which contains types that extend and augment the Java Collections Framework.\n\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data.\nVersions of commons-collections prior to `3.2.2` do not prevent deserialization of the class `org.apache.commons.collections.functors.InvokerTransformer`. This could be leveraged by an attacker as a gadget within a vulnerable application which deserializes user input to execute arbitrary code. \r\n\r\nVersions of commons-collections from 3.2.2 onwards will throw an `UnsupportedOperationException` error when attempts are made to deserialize InvokerTransformer instances to prevent potential remote code execution exploits.\r\n\r\n*Note:* `org.apache.commons:commons-collections` is no longer supported and has been moved to `org.apache.commons:commons-collections4` we recommend moving to the new artifact if possible.\r\n\r\n# PoC \r\n\r\n```\r\n/*\r\n\tGadget chain:\r\n\t\tObjectInputStream.readObject()\r\n\t\t\tAnnotationInvocationHandler.readObject()\r\n\t\t\t\tMap(Proxy).entrySet()\r\n\t\t\t\t\tAnnotationInvocationHandler.invoke()\r\n\t\t\t\t\t\tLazyMap.get()\r\n\t\t\t\t\t\t\tChainedTransformer.transform()\r\n\t\t\t\t\t\t\t\tConstantTransformer.transform()\r\n\t\t\t\t\t\t\t\tInvokerTransformer.transform()\r\n\t\t\t\t\t\t\t\t\tMethod.invoke()\r\n\t\t\t\t\t\t\t\t\t\tClass.getMethod()\r\n\t\t\t\t\t\t\t\tInvokerTransformer.transform()\r\n\t\t\t\t\t\t\t\t\tMethod.invoke()\r\n\t\t\t\t\t\t\t\t\t\tRuntime.getRuntime()\r\n\t\t\t\t\t\t\t\tInvokerTransformer.transform()\r\n\t\t\t\t\t\t\t\t\tMethod.invoke()\r\n\t\t\t\t\t\t\t\t\t\tRuntime.exec()\r\n\tRequires:\r\n\t\tcommons-collections\r\n */\r\n```\n\n# Details\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like _Remote Method Invocation (RMI)_, _Java Management Extension (JMX)_, _Java Messaging System (JMS)_, _Action Message Format (AMF)_, _Java Server Faces (JSF) ViewState_, etc.\r\n\r\n \r\n\r\n_Deserialization of untrusted data_ ([CWE-502](https://cwe.mitre.org/data/definitions/502.html)), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution.\r\n\r\n \r\n\r\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a [popular library (Apache Commons Collection)](https://snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\r\n\r\n \r\n\r\nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\r\n\r\n \r\n\r\n> Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\r\n\r\n- Apache Blog\r\n\r\n \r\n\r\nThe vulnerability, also know as _Mad Gadget_\r\n\r\n> Mad Gadget is one of the most pernicious vulnerabilities we’ve seen. By merely existing on the Java classpath, seven “gadget” classes in Apache Commons Collections (versions 3.0, 3.1, 3.2, 3.2.1, and 4.0) make object deserialization for the entire JVM process Turing complete with an exec function. Since many business applications use object deserialization to send messages across the network, it would be like hiring a bank teller who was trained to hand over all the money in the vault if asked to do so politely, and then entrusting that teller with the key. The only thing that would keep a bank safe in such a circumstance is that most people wouldn’t consider asking such a question.\r\n\r\n- Google\n\n\n# Remediation\n\nUpgrade `commons-collections:commons-collections` to version 3.2.2 or higher.\n\n\n# References\n\n- [GitHub Commit](https://github.com/apache/commons-collections/commit/5ec476b0b756852db865b2e442180f091f8209ee)\n\n- [GitHub PR](https://github.com/apache/commons-collections/pull/18)\n\n- [Jira Ticket](https://issues.apache.org/jira/browse/COLLECTIONS-580)\n"
|
|
46
|
+
},
|
|
47
|
+
"properties": {
|
|
48
|
+
"tags": [
|
|
49
|
+
"security",
|
|
50
|
+
"CWE-502",
|
|
51
|
+
"maven"
|
|
52
|
+
],
|
|
53
|
+
"cvssv3_baseScore": 5.6,
|
|
54
|
+
"security-severity": "5.6"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "SNYK-JAVA-COMMONSCOLLECTIONS-6056408",
|
|
59
|
+
"shortDescription": {
|
|
60
|
+
"text": "High severity - Deserialization of Untrusted Data vulnerability in commons-collections:commons-collections"
|
|
61
|
+
},
|
|
62
|
+
"fullDescription": {
|
|
63
|
+
"text": "(CVE-2015-4852) commons-collections:commons-collections@3.2.1"
|
|
64
|
+
},
|
|
65
|
+
"help": {
|
|
66
|
+
"text": "",
|
|
67
|
+
"markdown": "* Package Manager: maven\n* Vulnerable module: commons-collections:commons-collections\n* Introduced through: com.example:demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: com.example:demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\n# Overview\n[commons-collections:commons-collections](https://mvnrepository.com/artifact/commons-collections/commons-collections) is a library which contains types that extend and augment the Java Collections Framework.\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data. It is possible to execute arbitrary Java code with the `InvokerTransformer` serializable collections . The `sun.reflect.annotation.AnnotationInvocationHandler#readObject` method invokes `#entrySet` and `#get` on a deserialized collection. If an attacker has to ability to send serialized data (JMX, RMI, EJB) to an application using the `common-collections` library, it is possible to combine the aforementioned methods to execute arbitrary code on the application.\r\n\r\n`org.apache.commons:commons-collections` is no longer supported and has been moved to `org.apache.commons:commons-collections4`. We recommend moving to the new artifact if possible.\r\n\r\n**Note:** the scope of CVE-2015-4852 is limited to the WebLogic Server product.\n\n**NOTE:** \r\n\r\nThis vulnerability has also been identified as: [CVE-2015-7501](https://security.snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078)\n\n\n# Details\n\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like _Remote Method Invocation (RMI)_, _Java Management Extension (JMX)_, _Java Messaging System (JMS)_, _Action Message Format (AMF)_, _Java Server Faces (JSF) ViewState_, etc.\n\n_Deserialization of untrusted data_ ([CWE-502](https://cwe.mitre.org/data/definitions/502.html)), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution.\n\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a [popular library (Apache Commons Collection)](https://snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\n\n \nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\n \n\n> Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application, an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\n\n \n# Remediation\nUpgrade `commons-collections:commons-collections` to version 3.2.2 or higher.\n# References\n- [FoxGloveSecurity Blog](http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/)\n- [GitHub Commit](https://github.com/apache/commons-collections/commit/e585cd0433ae4cfbc56e58572b9869bd0c86b611)\n- [Jira Issue](https://issues.apache.org/jira/browse/COLLECTIONS-580)\n- [PoC](https://github.com/ianxtianxt/CVE-2015-7501)\n- [Exploit DB](https://www.exploit-db.com/exploits/46628)\n- [CISA - Known Exploited Vulnerabilities](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)\n"
|
|
68
|
+
},
|
|
69
|
+
"properties": {
|
|
70
|
+
"tags": [
|
|
71
|
+
"security",
|
|
72
|
+
"CWE-502",
|
|
73
|
+
"maven"
|
|
74
|
+
],
|
|
75
|
+
"cvssv3_baseScore": 9.8,
|
|
76
|
+
"security-severity": "9.8"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "snyk:lic:maven:commons-collections:commons-collections:Apache-2.0",
|
|
81
|
+
"shortDescription": {
|
|
82
|
+
"text": "High severity - Apache-2.0 license vulnerability in commons-collections:commons-collections"
|
|
83
|
+
},
|
|
84
|
+
"fullDescription": {
|
|
85
|
+
"text": "commons-collections:commons-collections@3.2.1"
|
|
86
|
+
},
|
|
87
|
+
"help": {
|
|
88
|
+
"text": "",
|
|
89
|
+
"markdown": "* Package Manager: maven\n* Module: commons-collections:commons-collections\n* Introduced through: com.example:demo@0.0.1-SNAPSHOT and commons-collections:commons-collections@3.2.1\n### Detailed paths\n* _Introduced through_: com.example:demo@0.0.1-SNAPSHOT › commons-collections:commons-collections@3.2.1\nApache-2.0 license"
|
|
90
|
+
},
|
|
91
|
+
"properties": {
|
|
92
|
+
"tags": [
|
|
93
|
+
"security",
|
|
94
|
+
"maven"
|
|
95
|
+
],
|
|
96
|
+
"security-severity": "undefined"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"results": [
|
|
103
|
+
{
|
|
104
|
+
"ruleId": "SNYK-JAVA-COMMONSCOLLECTIONS-30078",
|
|
105
|
+
"level": "error",
|
|
106
|
+
"message": {
|
|
107
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a high severity vulnerability."
|
|
108
|
+
},
|
|
109
|
+
"locations": [
|
|
110
|
+
{
|
|
111
|
+
"physicalLocation": {
|
|
112
|
+
"artifactLocation": {
|
|
113
|
+
"uri": "pom.xml"
|
|
114
|
+
},
|
|
115
|
+
"region": {
|
|
116
|
+
"startLine": 1
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"logicalLocations": [
|
|
120
|
+
{
|
|
121
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"fixes": [
|
|
127
|
+
{
|
|
128
|
+
"description": {
|
|
129
|
+
"text": "Upgrade to commons-collections:commons-collections@3.2.2"
|
|
130
|
+
},
|
|
131
|
+
"artifactChanges": [
|
|
132
|
+
{
|
|
133
|
+
"artifactLocation": {
|
|
134
|
+
"uri": "pom.xml"
|
|
135
|
+
},
|
|
136
|
+
"replacements": [
|
|
137
|
+
{
|
|
138
|
+
"deletedRegion": {
|
|
139
|
+
"startLine": 1
|
|
140
|
+
},
|
|
141
|
+
"insertedContent": {
|
|
142
|
+
"text": "commons-collections:commons-collections@3.2.2"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"ruleId": "SNYK-JAVA-COMMONSCOLLECTIONS-472711",
|
|
153
|
+
"level": "warning",
|
|
154
|
+
"message": {
|
|
155
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a medium severity vulnerability."
|
|
156
|
+
},
|
|
157
|
+
"locations": [
|
|
158
|
+
{
|
|
159
|
+
"physicalLocation": {
|
|
160
|
+
"artifactLocation": {
|
|
161
|
+
"uri": "pom.xml"
|
|
162
|
+
},
|
|
163
|
+
"region": {
|
|
164
|
+
"startLine": 1
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"logicalLocations": [
|
|
168
|
+
{
|
|
169
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"fixes": [
|
|
175
|
+
{
|
|
176
|
+
"description": {
|
|
177
|
+
"text": "Upgrade to commons-collections:commons-collections@3.2.2"
|
|
178
|
+
},
|
|
179
|
+
"artifactChanges": [
|
|
180
|
+
{
|
|
181
|
+
"artifactLocation": {
|
|
182
|
+
"uri": "pom.xml"
|
|
183
|
+
},
|
|
184
|
+
"replacements": [
|
|
185
|
+
{
|
|
186
|
+
"deletedRegion": {
|
|
187
|
+
"startLine": 1
|
|
188
|
+
},
|
|
189
|
+
"insertedContent": {
|
|
190
|
+
"text": "commons-collections:commons-collections@3.2.2"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"ruleId": "SNYK-JAVA-COMMONSCOLLECTIONS-6056408",
|
|
201
|
+
"level": "error",
|
|
202
|
+
"message": {
|
|
203
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a high severity vulnerability."
|
|
204
|
+
},
|
|
205
|
+
"locations": [
|
|
206
|
+
{
|
|
207
|
+
"physicalLocation": {
|
|
208
|
+
"artifactLocation": {
|
|
209
|
+
"uri": "pom.xml"
|
|
210
|
+
},
|
|
211
|
+
"region": {
|
|
212
|
+
"startLine": 1
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"logicalLocations": [
|
|
216
|
+
{
|
|
217
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"fixes": [
|
|
223
|
+
{
|
|
224
|
+
"description": {
|
|
225
|
+
"text": "Upgrade to commons-collections:commons-collections@3.2.2"
|
|
226
|
+
},
|
|
227
|
+
"artifactChanges": [
|
|
228
|
+
{
|
|
229
|
+
"artifactLocation": {
|
|
230
|
+
"uri": "pom.xml"
|
|
231
|
+
},
|
|
232
|
+
"replacements": [
|
|
233
|
+
{
|
|
234
|
+
"deletedRegion": {
|
|
235
|
+
"startLine": 1
|
|
236
|
+
},
|
|
237
|
+
"insertedContent": {
|
|
238
|
+
"text": "commons-collections:commons-collections@3.2.2"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"ruleId": "snyk:lic:maven:commons-collections:commons-collections:Apache-2.0",
|
|
249
|
+
"level": "error",
|
|
250
|
+
"message": {
|
|
251
|
+
"text": "This file introduces a vulnerable commons-collections:commons-collections package with a high severity vulnerability."
|
|
252
|
+
},
|
|
253
|
+
"locations": [
|
|
254
|
+
{
|
|
255
|
+
"physicalLocation": {
|
|
256
|
+
"artifactLocation": {
|
|
257
|
+
"uri": "pom.xml"
|
|
258
|
+
},
|
|
259
|
+
"region": {
|
|
260
|
+
"startLine": 1
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"logicalLocations": [
|
|
264
|
+
{
|
|
265
|
+
"fullyQualifiedName": "commons-collections:commons-collections@3.2.1"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
}
|