Skip to content

Commit 4b06a33

Browse files
committed
add more strict validations
1 parent ed95f06 commit 4b06a33

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

MCP-LT/MCPBrowserOrDriverVersionDisclosure.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,8 @@ execute:
4545
- req: []
4646
validate:
4747
response_payload:
48-
- not_magic_validate: "Analyze the response and check whether the response indicates that the request failed due to isError: true or any other error (like requested data nbot found, error processing request, server error, not accessible, etc)."
49-
- magic_validate: "\"Analyze the response and check whether it contains any data related to web browser version (chromedriverVersion, geckodriverVersion, edgedriverVersion, safaridriverVersion, driverVersion) or any value that contains a broswwer software version (digits with dots). Ignore all other types of versions."
48+
or:
49+
- regex: (?i)\b(?:chrome|firefox|safari|edge|opera|brave|vivaldi|ie|internet explorer)[\/\s]?([0-9]+(?:\.[0-9]+){0,3})
50+
- and:
51+
- not_magic_validate: "Analyze the response and check whether the response indicates that the request failed due to isError: true or any other error (like requested data nbot found, error processing request, server error, not accessible, etc)."
52+
- magic_validate: "\"Analyze the response and check whether it contains any data related to web browser version (chromedriverVersion, geckodriverVersion, edgedriverVersion, safaridriverVersion, driverVersion) or any value that contains a broswwer software version (digits with dots). Ignore all other types of versions."

MCP-LT/MCPFilePathDisclosure.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,13 @@ execute:
4343
- req: []
4444
validate:
4545
response_payload:
46-
- not_magic_validate: "Analyze the response and check whether the response indicates that the request failed due to isError: true or any other error (like requested data nbot found, error processing request, server error, not accessible, etc)."
47-
- magic_validate: "Check the response body strictly for literal absolute file system paths only. Unix-style paths must start with '/' followed by at least one valid directory or file name (e.g., /etc/passwd, /var/log/file.txt). Windows-style paths must start with a drive letter, colon, and backslash, followed by at least one directory or file name (e.g., C:\\Windows\\System32\\). Do NOT flag JSON keys, array names, or plain text that mention directories, logs, or file types unless they contain a literal absolute path. Do NOT flag empty arrays, placeholders (e.g., /path/to/file), relative paths (./file.txt, ../logs/debug.log), or strings that only look like paths but are not literal. Flag only actual paths that exist literally in the response."
46+
or:
47+
- contains_either:
48+
- "Program Files (x86)"
49+
- "/etc/passwd"
50+
- "/etc/shadow"
51+
- "C:\\Windows\\System32"
52+
- "C:\\Users\\Administrator"
53+
- and:
54+
- not_magic_validate: "Analyze the response and check whether the response indicates that the request failed due to isError: true or any other error (like requested data nbot found, error processing request, server error, not accessible, etc)."
55+
- magic_validate: "Check the response body strictly for literal absolute file system paths only. Unix-style paths must start with '/' followed by at least one valid directory or file name (e.g., /etc/passwd, /var/log/file.txt). Windows-style paths must start with a drive letter, colon, and backslash, followed by at least one directory or file name (e.g., C:\\Windows\\System32\\). Do NOT flag JSON keys, array names, or plain text that mention directories, logs, or file types unless they contain a literal absolute path. Do NOT flag empty arrays, placeholders (e.g., /path/to/file), relative paths (./file.txt, ../logs/debug.log), or strings that only look like paths but are not literal. Flag only actual paths that exist literally in the response."

MCP-LT/MCPWebdriverSessionExpose.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,14 @@ api_selection_filters:
5555
execute:
5656
type: single
5757
requests:
58-
- req: []
58+
- req:
59+
modify_body_param:
60+
testId: DA-WIN-466203-1756104789390435861FMZ
61+
delete_body_param: pageNumber
5962
validate:
6063
response_payload:
61-
- not_magic_validate: "Analyze the response and check whether the response indicates that the request failed due to isError: true or any other error (like requested data nbot found, error processing request, server error, not accessible, etc)."
62-
- magic_validate: "Whenever WebDriver sessionIds are exposed in the response body then it is a serious vulnerability. check for any such data in the given response. IGNORE errors, ids, sessionIds, etc that are not related to webDrivers."
64+
or:
65+
- regex: (?i)\bwd\/hub\/session\/(?:[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b
66+
# - and:
67+
# - not_magic_validate: "Analyze the response and check whether the response indicates that the request failed due to isError: true or any other error (like requested data nbot found, error processing request, server error, not accessible, etc)."
68+
# - magic_validate: "Whenever WebDriver sessionIds are exposed in the response body then it is a serious vulnerability. check for data like `wd/hub/session/{sessionId}` or any selenium related sessionIds. IGNORE errors, ids, sessionIds, etc that are not related to webDrivers."

0 commit comments

Comments
 (0)