Vulnerabilities in pkg:maven/com.jayway.jsonpath/json-path
PACKAGECVE-2023-51074 is a MODERATE (CVSS 5.3) json-path out-of-bounds write vulnerability vulnerability (CWE-787: Out-of-bounds Write) affecting Json path libraries in the Maven ecosystem. The issue involves json-path out-of-bounds write vulnerability. Remediation is available by upgrading affected packages to version 2.9.0.
pkg:maven/com.jayway.jsonpath/json-path
Vulnerability advisories affecting package pkg:maven/com.jayway.jsonpath/json-path. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-pfh2-hfmq-phg5 | CVE-2023-51074 | MODERATE | json-path Out-of-bounds Write vulnerability |
CVE-2023-51074 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2023-51074
To remediate this vulnerability, upgrade all affected Json path dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.9.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.jayway.jsonpath
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-51074, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.jayway.jsonpath
Analyze the terminal output to locate any version of Json path in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.jayway.jsonpath command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Json path, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-51074 Affected Json path Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.jayway.jsonpath:json-path
|
Maven |
≥ 2.2.0
< 2.9.0
|
2.9.0
|
References
Frequently Asked Questions
What is CVE-2023-51074?
Which Json path versions are affected?
What version fixes CVE-2023-51074?
Is json-path affected?
What is the CVSS score of CVE-2023-51074?
What CWE is associated with CVE-2023-51074?
How can I check Maven dependencies for CVE-2023-51074?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pfh2-hfmq-phg5",
"modified" : "2024-05-15T06:51:25Z",
"published" : "2023-12-27T21:31:01Z",
"aliases" : [ "CVE-2023-51074" ],
"summary" : "json-path Out-of-bounds Write vulnerability",
"details" : "json-path v2.8.0 was discovered to contain a stack overflow via the `Criteria.parse()` method.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.jayway.jsonpath:json-path"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.0"
}, {
"fixed" : "2.9.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-51074"
}, {
"type" : "WEB",
"url" : "https://github.com/json-path/JsonPath/issues/973"
}, {
"type" : "WEB",
"url" : "https://github.com/json-path/JsonPath/commit/71a09c1193726c010917f1157ecbb069ad6c3e3b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/json-path/JsonPath"
}, {
"type" : "WEB",
"url" : "https://github.com/json-path/JsonPath/releases/tag/json-path-2.9.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-09T19:28:14Z",
"nvd_published_at" : "2023-12-27T21:15:08Z"
}
}