# GHSA-5x5q-8cgm-2hjq: Karate has vulnerable dependency on json-smart package (CVE-2023-1370)

> Karate includes a vulnerable json-smart dependency allowing code execution; users should upgrade the json-path dependency.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not stated
- **Attackable:** Not stated
- **Victim action needed:** Not stated
- **Fix available:** Yes
- **Published:** 31 Mar 2023

## What is GHSA-5x5q-8cgm-2hjq?

GHSA-5x5q-8cgm-2hjq is a vulnerability in com.intuit.karate:karate-core, published on 31 Mar 2023. 

### Official description

### Summary
The CVE 
![image](https://user-images.githubusercontent.com/2663049/229081854-1155c041-56fa-48ca-a7ff-f2f085b845fd.png)

### How to fix it
Very simple, just upgrade json-path package to 2.8.0 (from 2.7.0) inside karate-core pom.xml ;)

## Which versions are affected by GHSA-5x5q-8cgm-2hjq?

2 open source packages ship an affected version, including com.intuit.karate:karate-core.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.intuit.karate:karate-core` | Maven | From 1.3.1 | 1.4.0 |
| `com.intuit.karate:karate-core` | Maven | From 1.3.1 | 1.4.0 |

## How do I fix GHSA-5x5q-8cgm-2hjq?

Upgrade com.intuit.karate:karate-core to 1.4.0 or later.

## Is GHSA-5x5q-8cgm-2hjq being exploited?

There is no known exploitation of GHSA-5x5q-8cgm-2hjq in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-5x5q-8cgm-2hjq and fix it if it is affected.

What it is: GHSA-5x5q-8cgm-2hjq is a vulnerability in com.intuit.karate:karate-core, published on 31 Mar 2023. 
Exploitation: There is no known exploitation of GHSA-5x5q-8cgm-2hjq in the wild and no public exploit code.

Affected packages and fixed versions:
- com.intuit.karate:karate-core (Maven): affected from 1.3.1; fixed in 1.4.0
- com.intuit.karate:karate-core (Maven): affected from 1.3.1; fixed in 1.4.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-5x5q-8cgm-2hjq/ (Markdown: https://insights.sbomify.com/GHSA-5x5q-8cgm-2hjq/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-5x5q-8cgm-2hjq

---
From sbomify Insights: https://insights.sbomify.com/GHSA-5x5q-8cgm-2hjq/
Summaries are generated and may contain mistakes; the official description above is the record.
