Vulnerabilities

15 via 24 paths

Dependencies

13

Source

GitHub

Commit

17f13226

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
  • 5
  • 8
  • 1
Status
  • 15
  • 0
  • 0

critical severity

Deserialization of Untrusted Data

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58
    Remediation: Upgrade to org.bouncycastle:bcprov-jdk15on@1.60.

Overview

org.bouncycastle:bcprov-jdk15on is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Deserialization of Untrusted Data via the XMSS/XMSS^MT private key deserialization. A handcrafted private key could include references to unexpected classes which would be picked up from the class path for the executing application.

Details

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

Deserialization of untrusted data (CWE-502), 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.

Java 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). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.

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

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

Remediation

Upgrade org.bouncycastle:bcprov-jdk15on to version 1.60 or higher.

References

high severity

Information Exposure

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58
    Remediation: Upgrade to org.bouncycastle:bcprov-jdk15on@1.61.

Overview

org.bouncycastle:bcprov-jdk15on is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Information Exposure. Attackers can obtain sensitive information about a private exponent because of Observable Differences in Behavior to Error Inputs. This occurs in org.bouncycastle.crypto.encodings.OAEPEncoding. Sending invalid ciphertext that decrypts to a short payload in the OAEP Decoder could result in the throwing of an early exception, potentially leaking some information about the private exponent of the RSA private key performing the encryption.

Remediation

Upgrade org.bouncycastle:bcprov-jdk15on to version 1.61 or higher.

References

high severity

Insecure Encryption

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58
    Remediation: Upgrade to org.bouncycastle:bcprov-jdk15on@1.60.

Overview

BouncyCastle is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Insecure Encryption. It has a flaw in the Low-level interface to RSA key pair generator, specifically RSA Key Pairs generated in low-level API with added certainty may have less M-R tests than expected.

Remediation

Upgrade org.bouncycastle:bcprov-jdk15on to version 1.60 or higher.

References

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: org.json:json
  • Introduced through: org.json:json@20170516 and com.mashape.unirest:unirest-java@1.4.9

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.json:json@20170516
    Remediation: Upgrade to org.json:json@20231013.
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.json:json@20170516

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@20170516 and com.mashape.unirest:unirest-java@1.4.9

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.json:json@20170516
    Remediation: Upgrade to org.json:json@20180130.
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.json:json@20170516

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS) when trying to initialize a JSONArray object and the input is [. This will cause the jvm to crash with StackOverflowError due to non-cyclical stack overflow.

PoC

new JSONArray("[")

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 20180130 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: org.json:json
  • Introduced through: org.json:json@20170516 and com.mashape.unirest:unirest-java@1.4.9

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.json:json@20170516
    Remediation: Upgrade to org.json:json@20230227.
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.json:json@20170516

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

medium severity

Observable Timing Discrepancy

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58

Overview

org.bouncycastle:bcprov-jdk15on is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Observable Timing Discrepancy via the PKCS#1 1.5 and OAEP decryption process. An attacker can recover ciphertexts via a side-channel attack by exploiting the Marvin security flaw. The PKCS#1 1.5 attack vector leaks data via javax.crypto.Cipher exceptions and the OAEP interface vector leaks via the bit size of the decrypted data.

Remediation

There is no fixed version for org.bouncycastle:bcprov-jdk15on.

References

medium severity

Uncontrolled Resource Consumption ('Resource Exhaustion')

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58

Overview

org.bouncycastle:bcprov-jdk15on is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') within the org.bouncycastle.openssl.PEMParser class. Parsing a file that has crafted ASN.1 data through the PEMParser causes an OutOfMemoryError.

Workaround

The attack can be avoided by filtering PEM requests containing EXTERNAL tagged encodings.

Remediation

There is no fixed version for org.bouncycastle:bcprov-jdk15on.

References

medium severity

Information Exposure

  • Vulnerable module: org.nanohttpd:nanohttpd
  • Introduced through: org.nanohttpd:nanohttpd@2.3.1

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.nanohttpd:nanohttpd@2.3.1

Overview

Affected versions of this package are vulnerable to Information Exposure. Whenever an HTTP Session is parsing the body of an HTTP request, the body of the request is written to a RandomAccessFile when the it is larger than 1024 bytes. This file is created with insecure permissions that allow its contents to be viewed by all users on the host machine.

Workaround: Manually specifying the -Djava.io.tmpdir= argument when launching Java to set the temporary directory to a directory exclusively controlled by the current user can fix this issue.

Remediation

There is no fixed version for org.nanohttpd:nanohttpd.

References

medium severity

Directory Traversal

  • Vulnerable module: org.apache.httpcomponents:httpclient
  • Introduced through: com.mashape.unirest:unirest-java@1.4.9

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpclient@4.5.2
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpasyncclient@4.1.1 org.apache.httpcomponents:httpclient@4.5.2
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpmime@4.5.2 org.apache.httpcomponents:httpclient@4.5.2

Overview

org.apache.httpcomponents:httpclient is a HttpClient component of the Apache HttpComponents project.

Affected versions of this package are vulnerable to Directory Traversal. String input by user is not validated for the presence of leading character / and is passed to the constructor as path information, resulting in a Directory Traversal vulnerability.

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.apache.httpcomponents:httpclient to version 4.5.3 or higher.

References

medium severity

Improper Input Validation

  • Vulnerable module: org.apache.httpcomponents:httpclient
  • Introduced through: com.mashape.unirest:unirest-java@1.4.9

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpclient@4.5.2
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpasyncclient@4.1.1 org.apache.httpcomponents:httpclient@4.5.2
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpmime@4.5.2 org.apache.httpcomponents:httpclient@4.5.2

Overview

org.apache.httpcomponents:httpclient is a HttpClient component of the Apache HttpComponents project.

Affected versions of this package are vulnerable to Improper Input Validation. Apache HttpClient can misinterpret malformed authority component in request URIs passed to the library as java.net.URI object and pick the wrong target host for request execution.

Remediation

Upgrade org.apache.httpcomponents:httpclient to version 4.5.13 or higher.

References

medium severity

Timing Attack

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58
    Remediation: Upgrade to org.bouncycastle:bcprov-jdk15on@1.66.

Overview

org.bouncycastle:bcprov-jdk15on is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Timing Attack. A timing issue within the EC math library can expose information about the private key when an attacker is able to observe timing information for the generation of multiple deterministic ECDSA signatures.

Remediation

Upgrade org.bouncycastle:bcprov-jdk15on to version 1.66 or higher.

References

medium severity

Cryptographic Issues

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58
    Remediation: Upgrade to org.bouncycastle:bcprov-jdk15on@1.69.

Overview

org.bouncycastle:bcprov-jdk15on is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Cryptographic Issues via weak key-hash message authentication code (HMAC) that is only 16 bits long which can result in hash collisions, as a result of an error within the BKS version 1 keystore (BKS-V1) files and could lead to an attacker being able to affect the integrity of these files. This vulnerability was introduced following an incomplete fix for CVE-2018-5382.

Remediation

Upgrade org.bouncycastle:bcprov-jdk15on to version 1.69 or higher.

References

medium severity

Information Exposure

  • Vulnerable module: org.bouncycastle:bcprov-jdk15on
  • Introduced through: org.bouncycastle:bcprov-jdk15on@1.58

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 org.bouncycastle:bcprov-jdk15on@1.58

Overview

org.bouncycastle:bcprov-jdk15on is a Java implementation of cryptographic algorithms.

Affected versions of this package are vulnerable to Information Exposure due to missing validation for the X.500 name of any certificate, subject, or issuer. The presence of a wild card may lead to information disclosure. This could allow a malicious user to obtain unauthorized information via blind LDAP Injection, exploring the environment and enumerating data.

Note:

The exploit depends on the structure of the target LDAP directory as well as what kind of errors are exposed to the user.

Remediation

A fix was pushed into the master branch but not yet published.

References

low severity

Information Exposure

  • Vulnerable module: commons-codec:commons-codec
  • Introduced through: com.mashape.unirest:unirest-java@1.4.9

Detailed paths

  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpclient@4.5.2 commons-codec:commons-codec@1.9
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpasyncclient@4.1.1 org.apache.httpcomponents:httpclient@4.5.2 commons-codec:commons-codec@1.9
  • Introduced through: benjaminehowe/yamm-client@benjaminehowe/yamm-client#17f132265192bdefd78b644e585dd44620417735 com.mashape.unirest:unirest-java@1.4.9 org.apache.httpcomponents:httpmime@4.5.2 org.apache.httpcomponents:httpclient@4.5.2 commons-codec:commons-codec@1.9

Overview

commons-codec:commons-codec is a package that contains simple encoder and decoders for various formats such as Base64 and Hexadecimal.

Affected versions of this package are vulnerable to Information Exposure. When there is no byte array value that can be encoded into a string the Base32 implementation does not reject it, and instead decodes it into an arbitrary value which can be re-encoded again using the same implementation. This allows for information exposure exploits such as tunneling additional information via seemingly valid base 32 strings.

Remediation

Upgrade commons-codec:commons-codec to version 1.13 or higher.

References