Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade json-smart from 2.5.1 to 2.5.2 fixing CVE-2024-57699 #2663

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

julianladisch
Copy link
Contributor

@julianladisch julianladisch commented Mar 9, 2025

For details about CVE-2024-57699 see
https://github.com/netplex/json-smart-v2/releases/tag/2.5.2

Karate uses new JsonSmartJsonProvider() that uses JSONParser.MODE_PERMISSIVE that includes LIMIT_JSON_DEPTH and therefore is not affected by CVE-2024-57699:

However, other projects that use Karate may directly call new JsonSmartJsonProvider(int parseMode) with one of the other default modes and are vulnerable.

Therefore Karate should ship the fixed version.

Description

Thanks for contributing this Pull Request. Make sure that you submit this Pull Request against the develop branch of this repository, add a brief description, and tag the relevant issue(s) and PR(s) below.

For details about CVE-2024-57699 see
https://github.com/netplex/json-smart-v2/releases/tag/2.5.2

Karate uses `new JsonSmartJsonProvider()` that uses `JSONParser.MODE_PERMISSIVE` that includes `LIMIT_JSON_DEPTH` and therefore
is not affected by CVE-2024-57699:
https://github.com/karatelabs/karate/blob/v1.5.2.RC2/karate-core/src/main/java/com/intuit/karate/JsonUtils.java#L74
https://github.com/json-path/JsonPath/blob/json-path-2.9.0/json-path/src/main/java/com/jayway/jsonpath/spi/json/JsonSmartJsonProvider.java#L39
https://github.com/netplex/json-smart-v2/blob/2.5.1/json-smart/src/main/java/net/minidev/json/parser/JSONParser.java#L110

However, other projects that use Karate may directly call `new JsonSmartJsonProvider(int parseMode)` with one of the other default
modes and are vulnerable.

Therefore Karate should ship the fixed version.
@ptrthomas ptrthomas merged commit 444f463 into karatelabs:develop Mar 11, 2025
3 checks passed
@julianladisch julianladisch deleted the json-smart-2.5.2 branch March 11, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants