Vulnerabilities

13 via 13 paths

Dependencies

23

Source

GitHub

Commit

13779b90

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
  • 8
  • 4
Status
  • 13
  • 0
  • 0

critical severity

Remote Code Execution (RCE)

  • Vulnerable module: com.h2database:h2
  • Introduced through: com.h2database:h2@1.4.200

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 com.h2database:h2@1.4.200
    Remediation: Upgrade to com.h2database:h2@2.1.210.

Overview

com.h2database:h2 is a database engine

Affected versions of this package are vulnerable to Remote Code Execution (RCE) via a jdbc:h2:mem JDBC URL containing the IGNORE_UNKNOWN_SETTINGS=TRUE;FORBID_CREATION=FALSE;INIT=RUNSCRIPT substring.

Remediation

Upgrade com.h2database:h2 to version 2.1.210 or higher.

References

high severity

XML External Entity (XXE) Injection

  • Vulnerable module: org.apache.xmlbeans:xmlbeans
  • Introduced through: org.dbunit:dbunit@2.6.0

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 org.dbunit:dbunit@2.6.0 org.apache.poi:poi-ooxml@3.17 org.apache.poi:poi-ooxml-schemas@3.17 org.apache.xmlbeans:xmlbeans@2.6.0
    Remediation: Upgrade to org.dbunit:dbunit@2.7.1.

Overview

Affected versions of this package are vulnerable to XML External Entity (XXE) Injection. The XML parsers used by XMLBeans did not set the properties needed to protect the user from malicious XML input. Vulnerabilities include possibilities for XML Entity Expansion attacks.

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.apache.xmlbeans:xmlbeans to version 3.0.0 or higher.

References

high severity

Remote Code Execution (RCE)

  • Vulnerable module: com.h2database:h2
  • Introduced through: com.h2database:h2@1.4.200

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 com.h2database:h2@1.4.200
    Remediation: Upgrade to com.h2database:h2@2.0.206.

Overview

com.h2database:h2 is a database engine

Affected versions of this package are vulnerable to Remote Code Execution (RCE). H2 Console allows loading of custom classes from remote servers through JNDI. This can lead to code execution

If remote access was enabled explicitly and some protection method (such as security constraint) are not set, an intruder can load their own custom class and execute their code in a process using H2 Console (a H2 Server process or a web server with H2 Console servlet).

Note: It should be noted that H2 Console doesn't accept remote connections by default.

Workarounds

  • H2 Console should never be available to untrusted users.

  • -webAllowOthers is a dangerous setting that should be avoided.

  • H2 Console Servlet deployed on a web server can be protected with a security constraint: https://h2database.com/html/tutorial.html#usingH2ConsoleServlet If webAllowOthers is specified, you need to uncomment and edit and as necessary. See documentation of your web server for more details.

All these workaround are mitigatory and unlikely to prevent all attack vectors, upgrade to a fixed version for full remediation.

Remediation

Upgrade com.h2database:h2 to version 2.0.206 or higher.

References

high severity

XML External Entity (XXE) Injection

  • Vulnerable module: com.h2database:h2
  • Introduced through: com.h2database:h2@1.4.200

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 com.h2database:h2@1.4.200
    Remediation: Upgrade to com.h2database:h2@2.0.202.

Overview

com.h2database:h2 is a database engine

Affected versions of this package are vulnerable to XML External Entity (XXE) Injection via the org.h2.jdbc.JdbcSQLXML class object, when it receives parsed string data from org.h2.jdbc.JdbcResultSet.getSQLXML() method. If it executes the getSource() method when the parameter is DOMSource.class it will trigger the vulnerability.

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 com.h2database:h2 to version 2.0.202 or higher.

References

high severity

Arbitrary Code Execution

  • Vulnerable module: org.apache.velocity:velocity-engine-core
  • Introduced through: org.apache.velocity:velocity-engine-core@2.1

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 org.apache.velocity:velocity-engine-core@2.1
    Remediation: Upgrade to org.apache.velocity:velocity-engine-core@2.3.

Overview

org.apache.velocity:velocity-engine-core is a template engine written in Java.

Affected versions of this package are vulnerable to Arbitrary Code Execution. An attacker that is able to modify Velocity templates may execute arbitrary Java code or run arbitrary system commands with the same privileges as the account running the Servlet container. This applies to applications that allow untrusted users to upload/modify velocity templates running Apache Velocity Engine.

Note Users of org.apache.velocity:velocity should update to org.apache.velocity:velocity-engine-core version 2.3 to mitigate this vulnerability.

Remediation

Upgrade org.apache.velocity:velocity-engine-core to version 2.3 or higher.

References

high severity

Remote Code Execution (RCE)

  • Vulnerable module: com.h2database:h2
  • Introduced through: com.h2database:h2@1.4.200

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 com.h2database:h2@1.4.200

Overview

com.h2database:h2 is a database engine

Affected versions of this package are vulnerable to Remote Code Execution (RCE). It provides a web console for managing the database, and by default it does not have a password set. The CREATE ALIAS function calls Java code, allowing an attacker to execute arbitrary Java code on projects running the h2 database.

NOTE: To be remotely exploitable, the affected application must be configured with the non-default setting webAllowOthers=true, either in a config file or as a parameter passed in when the servlet is invoked. The vulnerability can be avoided by setting a password on the database and/or restricting access to localhost using the above setting.

PoC

CREATE ALIAS REVERSE AS $$ String reverse(String s) { return new StringBuilder(s).reverse().toString(); } $$;
CALL REVERSE('Test');

Remediation

There is no fixed version for com.h2database:h2.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: org.json:json
  • Introduced through: org.json:json@20190722

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 org.json:json@20190722
    Remediation: Upgrade to org.json:json@20231013.

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling. An attacker can cause indefinite amounts of memory to be used by inputting a string of modest size. This can lead to a Denial of Service.

PoC

package orgjsonbug;

import org.json.JSONObject;

/**
 * Illustrates a bug in JSON-Java.
 */
public class Bug {
  private static String makeNested(int depth) {
    if (depth == 0) {
      return "{\"a\":1}";
    }
    return "{\"a\":1;\t\0" + makeNested(depth - 1) + ":1}";
  }

  public static void main(String[] args) {
    String input = makeNested(30);
    System.out.printf("Input string has length %d: %s\n", input.length(), input);
    JSONObject output = new JSONObject(input);
    System.out.printf("Output JSONObject has length %d: %s\n", output.toString().length(), output);
  }
}

Remediation

Upgrade org.json:json to version 20231013 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: org.json:json
  • Introduced through: org.json:json@20190722

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 org.json:json@20190722
    Remediation: Upgrade to org.json:json@20230227.

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS) in the XML.toJSONObject component via crafted JSON or XML data.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike 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.

One 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.

When 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.

Two common types of DoS vulnerabilities:

  • 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.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade org.json:json to version 20230227 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: org.jsoup:jsoup
  • Introduced through: org.jsoup:jsoup@1.12.1

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 org.jsoup:jsoup@1.12.1
    Remediation: Upgrade to org.jsoup:jsoup@1.14.2.

Overview

org.jsoup:jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.

Affected versions of this package are vulnerable to Denial of Service (DoS). If the parser is run on user supplied input, an attacker may supply content that causes the parser to get stuck (loop indefinitely until cancelled), to complete more slowly than usual, or to throw an unexpected exception. This effect may support a denial of service attack. There are a few available workarounds. Users may rate limit input parsing, limit the size of inputs based on system resources, and/or implement thread watchdogs to cap and timeout parse runtimes.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike 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.

One 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.

When 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.

Two common types of DoS vulnerabilities:

  • 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.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade org.jsoup:jsoup to version 1.14.2 or higher.

References

medium severity

Information Exposure

  • Vulnerable module: com.h2database:h2
  • Introduced through: com.h2database:h2@1.4.200

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 com.h2database:h2@1.4.200
    Remediation: Upgrade to com.h2database:h2@2.2.220.

Overview

com.h2database:h2 is a database engine

Affected versions of this package are vulnerable to Information Exposure when H2 web-based admin console was started via the CLI with the argument -webAdminPassword, which allows a local user to specify the password in plaintext for the web admin console. Consequently, a malicious local user or an attacker that has obtained local access through some means would be able to get the password for the H2 web admin console by looking at the running processes.

Vendor Statement: "This is not a vulnerability of the H2 Console, this is an example of how not to use it. I think there is nothing to do with it on the H2 side. Passwords should never be passed on the command line, and every qualified DBA or system administrator is expected to know that."

Remediation

Upgrade com.h2database:h2 to version 2.2.220 or higher.

References

medium severity

Directory Traversal

  • Vulnerable module: commons-io:commons-io
  • Introduced through: commons-io:commons-io@2.6

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 commons-io:commons-io@2.6
    Remediation: Upgrade to commons-io:commons-io@2.7.

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

XML External Entity (XXE) Injection

  • Vulnerable module: org.apache.poi:poi-ooxml
  • Introduced through: org.dbunit:dbunit@2.6.0

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 org.dbunit:dbunit@2.6.0 org.apache.poi:poi-ooxml@3.17
    Remediation: Upgrade to org.dbunit:dbunit@2.7.1.

Overview

org.apache.poi:poi-ooxml is a Java API To Access Microsoft Format Files.

Affected versions of this package are vulnerable to XML External Entity (XXE) Injection. When using the tool XSSFExportToXml to convert user-provided Microsoft Excel documents, a specially crafted document can allow an attacker to read files from the local filesystem or from internal network resources via XML External Entity (XXE) Processing.

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.apache.poi:poi-ooxml to version 4.1.0 or higher.

References

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: org.jsoup:jsoup
  • Introduced through: org.jsoup:jsoup@1.12.1

Detailed paths

  • Introduced through: aposin/LicenseScout@aposin/LicenseScout#13779b90b74c5c33e1b7764cafdd7c6dc8ca01b1 org.jsoup:jsoup@1.12.1
    Remediation: Upgrade to org.jsoup:jsoup@1.15.3.

Overview

org.jsoup:jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to improper sanitization of HTML including javascript: URL expressions if the non-default SafeList.preserveRelativeLinks option is enabled and no Content Security Policy is set on the website.

Note: Users that are upgrading to the fixed version should also clean old content again because unsanitized input may have persisted.

Mitigation

Users unable to upgrade to the fixed version should disable the SafeList.preserveRelativeLinks option, which will rewrite input URLs as absolute URLs and ensure an appropriate Content Security Policy is defined. It could be also used should as a defense-in-depth best practice.

Details

A 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.

This 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.

Injecting 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.

Escaping 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 &lt; and > can be coded as &gt; 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.

The 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.

Types of attacks

There are a few methods by which XSS can be manipulated:

Type Origin Description
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.
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.
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.
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.

Affected environments

The following environments are susceptible to an XSS attack:

  • Web servers
  • Application servers
  • Web application environments

How to prevent

This section describes the top best practices designed to specifically protect your code:

  • 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.
  • Convert special characters such as ?, &, /, <, > and spaces to their respective HTML or URL encoded equivalents.
  • Give users the option to disable client-side scripts.
  • Redirect invalid requests.
  • Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
  • Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
  • Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.

Remediation

Upgrade org.jsoup:jsoup to version 1.15.3 or higher.

References