connexta/replication
Find, fix and prevent vulnerabilities in your code.
medium severity
- Vulnerable module: commons-io:commons-io
- Introduced through: org.codice.test:junit-extensions@0.9
Detailed paths
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › org.codice.test:internal@0.9 › commons-io:commons-io@2.6
Overview
commons-io:commons-io is a The Apache Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more.
Affected versions of this package are vulnerable to Uncontrolled Resource Consumption through the XmlStreamReader
class. An attacker can cause the application to consume excessive CPU resources by sending specially crafted XML content.
Remediation
Upgrade commons-io:commons-io
to version 2.14.0 or higher.
References
medium severity
- Vulnerable module: commons-io:commons-io
- Introduced through: org.codice.test:junit-extensions@0.9
Detailed paths
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › org.codice.test:internal@0.9 › commons-io:commons-io@2.6
Overview
commons-io:commons-io is a The Apache Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more.
Affected versions of this package are vulnerable to Directory Traversal via calling the method FileNameUtils.normalize using an improper string like //../foo
or \\..\foo
, which may allow access to files in the parent directory.
Details
A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.
Directory Traversal vulnerabilities can be generally divided into two types:
- Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.
st
is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public
route.
If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.
curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa
Note %2e
is the URL encoded version of .
(dot).
- Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as
Zip-Slip
.
One way to achieve this is by using a malicious zip
archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.
The following is an example of a zip
archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/
overwriting the authorized_keys
file:
2018-04-15 22:04:29 ..... 19 19 good.txt
2018-04-15 22:04:42 ..... 20 20 ../../../../../../root/.ssh/authorized_keys
Remediation
Upgrade commons-io:commons-io
to version 2.7 or higher.
References
medium severity
new
- Module: junit:junit
- Introduced through: junit:junit@4.12 and org.codice.test:junit-extensions@0.9
Detailed paths
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › junit:junit@4.12
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › junit:junit@4.12
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › org.codice.test:internal@0.9 › junit:junit@4.12
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › org.spockframework:spock-core@1.1-groovy-2.4 › junit:junit@4.12
…and 1 more
EPL-1.0 license
low severity
- Vulnerable module: junit:junit
- Introduced through: junit:junit@4.12 and org.codice.test:junit-extensions@0.9
Detailed paths
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › junit:junit@4.12Remediation: Upgrade to junit:junit@4.13.1.
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › junit:junit@4.12
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › org.codice.test:internal@0.9 › junit:junit@4.12
-
Introduced through: connexta/replication@connexta/replication#c2485c0f39ae92bb9cbedc680c1de72a8b9de0ce › org.codice.test:junit-extensions@0.9 › org.spockframework:spock-core@1.1-groovy-2.4 › junit:junit@4.12
…and 1 more
Overview
junit:junit is an unit testing framework for Java
Affected versions of this package are vulnerable to Information Exposure. The JUnit4 test rule TemporaryFolder
contains a local information disclosure vulnerability. On Unix like systems, the system's temporary directory is shared between all users on that system. Because of this, when files and directories are written into this directory they are, by default, readable by other users on that same system.
Note: This vulnerability does not allow other users to overwrite the contents of these directories or files. This only affects Unix like systems.
Remediation
Upgrade junit:junit
to version 4.13.1 or higher.