Vulnerabilities

4 via 6 paths

Dependencies

58

Source

GitHub

Commit

40fbacfd

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 4
  • 1
Severity
  • 1
  • 4
Status
  • 5
  • 0
  • 0

high severity

Uncontrolled Recursion

  • Vulnerable module: org.apache.commons:commons-lang3
  • Introduced through: org.apache.commons:commons-lang3@3.12.0 and com.dlsc.pdfviewfx:pdfviewfx@1.7.0

Detailed paths

  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.commons:commons-lang3@3.12.0
    Remediation: Upgrade to org.apache.commons:commons-lang3@3.18.0.
  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c com.dlsc.pdfviewfx:pdfviewfx@1.7.0 org.apache.commons:commons-lang3@3.12.0

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion via the ClassUtils.getClass function. An attacker can cause the application to terminate unexpectedly by providing excessively long input values.

Remediation

Upgrade org.apache.commons:commons-lang3 to version 3.18.0 or higher.

References

medium severity

Uncontrolled Resource Consumption ('Resource Exhaustion')

  • Vulnerable module: commons-io:commons-io
  • Introduced through: org.apache.poi:poi-scratchpad@5.2.2

Detailed paths

  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.poi:poi-scratchpad@5.2.2 org.apache.poi:poi@5.2.2 commons-io:commons-io@2.11.0
    Remediation: Upgrade to org.apache.poi:poi-scratchpad@5.2.5.

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 ('Resource Exhaustion') 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
new

XML External Entity (XXE) Injection

  • Vulnerable module: org.assertj:assertj-core
  • Introduced through: org.apache.poi:poi-scratchpad@5.2.2

Detailed paths

  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.poi:poi-scratchpad@5.2.2 org.apache.logging.log4j:log4j-api@2.17.2 org.assertj:assertj-core@3.22.0
    Remediation: Upgrade to org.apache.poi:poi-scratchpad@5.2.2.
  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.poi:poi-scratchpad@5.2.2 org.apache.poi:poi@5.2.2 org.apache.logging.log4j:log4j-api@2.17.2 org.assertj:assertj-core@3.22.0
    Remediation: Upgrade to org.apache.poi:poi-scratchpad@5.2.2.

Overview

Affected versions of this package are vulnerable to XML External Entity (XXE) Injection via the toXmlDocument function of XmlStringPrettyFormatter. An attacker can read arbitrary local files, perform server-side request forgery, or cause denial of service by providing crafted XML input containing external entities.

Note: This formatter is used by isXmlEqualTo(CharSequence) and xmlPrettyFormat(String) and could be exploited if untrusted XML input is processed by the methods.

Workaround

Replace use of isXmlEqualTo(CharSequence) with XMLUnit.

Details

XXE Injection is a type of attack against an application that parses XML input. XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. By default, many XML processors allow specification of an external entity, a URI that is dereferenced and evaluated during XML processing. When an XML document is being parsed, the parser can make a request and include the content at the specified URI inside of the XML document.

Attacks can include disclosing local files, which may contain sensitive data such as passwords or private user data, using file: schemes or relative paths in the system identifier.

For example, below is a sample XML document, containing an XML element- username.

<xml>
<?xml version="1.0" encoding="ISO-8859-1"?>
   <username>John</username>
</xml>

An external XML entity - xxe, is defined using a system identifier and present within a DOCTYPE header. These entities can access local or remote content. For example the below code contains an external XML entity that would fetch the content of /etc/passwd and display it to the user rendered by username.

<xml>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
   <!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
   <username>&xxe;</username>
</xml>

Other XXE Injection attacks can access local resources that may not stop returning data, possibly impacting application availability and leading to Denial of Service.

Remediation

Upgrade org.assertj:assertj-core to version 3.27.7 or higher.

References

medium severity

Directory Traversal

  • Vulnerable module: org.zwobble.mammoth:mammoth
  • Introduced through: org.zwobble.mammoth:mammoth@1.4.2

Detailed paths

  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.zwobble.mammoth:mammoth@1.4.2
    Remediation: Upgrade to org.zwobble.mammoth:mammoth@1.11.0.

Overview

Affected versions of this package are vulnerable to Directory Traversal due to the lack of path or file type validation when processing a docx file containing an image with an external link (r:link attribute instead of embedded r:embed). The library resolves the URI to a file path and after reading, the content is encoded as base64 and included in the HTML output as a data URI. An attacker can read arbitrary files on the system where the conversion is performed or cause an excessive resources consumption by crafting a docx file that links to special device files such as /dev/random or /dev/zero.

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 org.zwobble.mammoth:mammoth to version 1.11.0 or higher.

References

medium severity

EPL-1.0 license

  • Module: junit:junit
  • Introduced through: com.dlsc.pdfviewfx:pdfviewfx@1.7.0 and org.apache.poi:poi-scratchpad@5.2.2

Detailed paths

  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c com.dlsc.pdfviewfx:pdfviewfx@1.7.0 org.apache.pdfbox:pdfbox@2.0.24 org.apache.pdfbox:fontbox@2.0.24 junit:junit@4.13.2
  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.poi:poi-scratchpad@5.2.2 org.apache.logging.log4j:log4j-api@2.17.2 org.junit.jupiter:junit-jupiter-migrationsupport@5.8.2 junit:junit@4.13.2
  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.poi:poi-scratchpad@5.2.2 org.apache.logging.log4j:log4j-api@2.17.2 org.junit.vintage:junit-vintage-engine@5.8.2 junit:junit@4.13.2
  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.poi:poi-scratchpad@5.2.2 org.apache.poi:poi@5.2.2 org.apache.logging.log4j:log4j-api@2.17.2 org.junit.jupiter:junit-jupiter-migrationsupport@5.8.2 junit:junit@4.13.2
  • Introduced through: Document-Archiver/com.sophisticatedapps.archiving.document-archiver@Document-Archiver/com.sophisticatedapps.archiving.document-archiver#40fbacfd86504a14b976ce81c500f3e98f3d3b7c org.apache.poi:poi-scratchpad@5.2.2 org.apache.poi:poi@5.2.2 org.apache.logging.log4j:log4j-api@2.17.2 org.junit.vintage:junit-vintage-engine@5.8.2 junit:junit@4.13.2

EPL-1.0 license