# CVE-2025-1302: JSONPath Plus allows Remote Code Execution

> An attacker can execute arbitrary code on systems using the jsonpath-plus library due to improper input sanitization in safe mode.

- **Severity:** Critical 9.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Feb 2025
- **Updated:** 18 Feb 2025
- **Also known as:** CLSA-2026-1774657371, GHSA-hw8r-x6gr-5gjp, MINI-qf95-q77j-xf3m, ROOT-APP-NPM-CVE-2025-1302

## What is CVE-2025-1302?

CVE-2025-1302 is a critical code injection vulnerability in jsonpath-plus, published on 15 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Versions of the package jsonpath-plus before 10.3.0 are vulnerable to Remote Code Execution (RCE) due to improper input sanitization. An attacker can execute aribitrary code on the system by exploiting the unsafe default usage of eval='safe' mode.**Note:**This is caused by an incomplete fix for [CVE-2024-21534](https://security.snyk.io/vuln/SNYK-JS-JSONPATHPLUS-7945884).

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2025-1302?

2 open source packages ship an affected version, including jsonpath-plus.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jsonpath-plus` | npm | All versions | 10.3.0 |
| `jsonpath-plus` | npm | All versions | 10.3.0 |

## How do I fix CVE-2025-1302?

Upgrade jsonpath-plus to 10.3.0 or later.

## Is CVE-2025-1302 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1302 exists.

Public exploit code:

- JSONPath-plus Remote Code Execution (github_poc): https://github.com/EQSTLab/CVE-2025-1302
- PoC exploit and vulnerable server demo for CVE-2025-1302 in jsonpath-plus. (github_poc): https://github.com/abrewer251/CVE-2025-1302_jsonpath-plus_RCE
- JSONPath Plus < 10.3.0 - Remote Code Execution (nuclei): http/cves/2025/CVE-2025-1302.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-1302 and fix it if it is affected.

What it is: CVE-2025-1302 is a critical code injection vulnerability in jsonpath-plus, published on 15 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1302 exists.

Affected packages and fixed versions:
- jsonpath-plus (npm): affected all versions; fixed in 10.3.0
- jsonpath-plus (npm): affected all versions; fixed in 10.3.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/CVE-2025-1302/ (Markdown: https://insights.sbomify.com/CVE-2025-1302/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-1302
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-1302
- OSV: https://osv.dev/vulnerability/CVE-2025-1302

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-1302/
Summaries are generated and may contain mistakes; the official description above is the record.
