-
Notifications
You must be signed in to change notification settings - Fork 37
Mcp pro #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pro
Are you sure you want to change the base?
Mcp pro #202
Changes from 14 commits
d2bb4c2
3775a59
772bbaf
ed07430
dd9f84b
dbdf305
ef6436d
0a2ad49
dbdbade
74a7c9d
4b31726
3491fb3
5e3a6c8
dbd726c
a824c93
07d5ead
ca63fd4
eaa7779
1392323
c885eb5
7747f5b
e495a15
9e20c7e
ca4e007
1c0468f
1c0e99d
cd5e925
27cfbf1
16bb80d
d2bb6c3
c24dfe6
f96b3af
6da07a7
645c6ee
251d96b
9dcb3bc
025f16c
22e00f5
acaaf99
bc25643
b74b374
f564123
2560ce2
5f10a48
09c2831
842b30e
ce60351
59fc04c
115583f
f1161c8
fc0ccf8
b902aa2
d00c143
f344c5f
a43e6dd
9cbc90b
a89f2ca
36e325d
a06f433
78b6938
6660fc9
879917e
4deb288
dcefd8a
638c17f
c9e698f
049f5fd
275bf72
82316f6
d6c5856
f8b2e69
3417178
aa41d89
65a2c04
418bb2e
c1aa9bc
d27c7d0
6a8c9e8
e0cd7f9
dfe2c9f
2e01004
8aec1f1
c8b5d91
ed95f06
4b06a33
1eff02a
d7e6094
6816861
61aab35
5bb38e8
bbf75a5
d13030a
4ea3b52
12f3636
fcf9f70
ee166fd
27e163e
4f894bc
bd96ba9
d4ff61a
52fa099
dc9f3a0
9bbe955
6787070
6202788
25d16c9
f4a9c6d
fba7c1e
4c09c07
0e4801b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| id: AUTHENTICATION_WITH_WRONG_AUTH_SCHEME_MCP | ||
| info: | ||
| name: Authentication with Wrong Authorization Scheme (MCP) | ||
| description: | | ||
| This test checks whether the MCP server strictly enforces the use of the expected authorization scheme. | ||
| details: | | ||
| The request modifies the Authorization header to use the "Basic" scheme instead of the expected "Bearer" scheme. If the server accepts this modification, it indicates weak authentication enforcement. | ||
| impact: | | ||
| Accepting requests with the wrong authorization scheme may allow bypassing intended authentication mechanisms or introduce unexpected behavior. | ||
| category: | ||
| name: MCP_AUTH | ||
| shortName: MCP_AUTH | ||
| displayName: Model Context Protocol (MCP) Security - Broken Authentication | ||
| subCategory: AUTHENTICATION_WITH_WRONG_AUTH_SCHEME_MCP | ||
| severity: HIGH | ||
| tags: | ||
| - Authentication | ||
| - OWASP top 10 | ||
| - Business logic | ||
| references: | ||
| - https://portswigger.net/web-security/authentication | ||
| - https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html | ||
| cwe: | ||
| - CWE-287 | ||
| cve: | ||
| - CVE-2023-27997 | ||
| attributes: | ||
| nature: INTRUSIVE | ||
| plan: PRO | ||
| duration: FAST | ||
| api_selection_filters: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| method: | ||
| eq: POST | ||
| request_payload: | ||
| contains_all: | ||
| - jsonrpc | ||
| - method | ||
| - params | ||
| request_headers: | ||
| for_one: | ||
| key: | ||
| regex: .* | ||
| extract: authHeaderKey | ||
| value: | ||
| regex: ^Bearer.* | ||
| extract: authHeaderVal | ||
| execute: | ||
| type: single | ||
| requests: | ||
| - req: | ||
| - modify_header: | ||
| authHeaderKey: "Basic ${authHeaderVal}" | ||
| validate: | ||
| response_code: | ||
| gte: 401 | ||
| response_payload: | ||
| contains_either: "$magic Check whether the response contains any kind of error response (error status, error fields, error messages, error flags or any json key related to error) related to authentication failure. If there is any error then return nothing just empty braces []. Else return a list of words from the response only in case of successful response." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| id: AUTHENTICATION_TOKEN_REFLECTION_IN_RESPONSE_MCP | ||
| info: | ||
| name: Authenticaton Token Reflection in Response (MCP) | ||
| description: | | ||
| This test verifies whether the access token provided in the Authorization header is echoed back in the server's response. | ||
| details: | | ||
| Reflecting sensitive tokens in the response increases the risk of token leakage through logs, error messages, or intermediate systems. This test sends a valid token and observes whether it is reflected back in the response body. | ||
| impact: | | ||
| Token reflection can lead to credential exposure, log injection, or unintended propagation of secrets, especially if the server response is cached or logged. | ||
| category: | ||
| name: MCP_AUTH | ||
| shortName: MCP_AUTH | ||
| displayName: Model Context Protocol (MCP) Security - Broken Authentication | ||
| subCategory: AUTHENTICATION_TOKEN_REFLECTION_IN_RESPONSE_MCP | ||
| severity: HIGH | ||
| tags: | ||
| - Authentication | ||
| - Token reflection | ||
| - OWASP top 10 | ||
| - Business logic | ||
| references: | ||
| - https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html | ||
| - https://owasp.org/www-community/attacks/Information_exposure_through_query_strings_in_url | ||
| cwe: | ||
| - CWE-200 | ||
| cve: | ||
| - CVE-2023-1644 | ||
| attributes: | ||
| nature: INTRUSIVE | ||
| plan: PRO | ||
| duration: FAST | ||
| api_selection_filters: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| method: | ||
| eq: POST | ||
| request_payload: | ||
| contains_all: | ||
| - jsonrpc | ||
| - method | ||
| - params | ||
| request_headers: | ||
| for_one: | ||
| key: | ||
| contains_either: "$magic From the request headers, find the key that contains the authorization information. It must contain the access token or credentials used for authentication. Return only the header key name." | ||
| extract: authHeaderKey | ||
| value: | ||
| extract: authHeaderVal | ||
| execute: | ||
| type: single | ||
| requests: | ||
| - req: [] | ||
| validate: | ||
| response_payload: | ||
| contains_either: "$magic Check whether the response body contains the authentication token value that was passed in the request header (the heder value: ${authHeaderVal}). If there is no exact token matching, then return just empty braces. Else return a list with the exact token found in the response." |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| id: AUTHENTICATION_TOKEN_REFLECTION_IN_HEADERS_MCP | ||
| info: | ||
| name: Authentication Token Reflection in Response Headers (MCP) | ||
| description: | | ||
| This test verifies whether the access token provided in the Authorization header is echoed back in the server's response headers. | ||
| details: | | ||
| Reflecting sensitive tokens in response headers poses a serious risk of credential leakage via logs, proxies, caches, or browser access. | ||
| This test modifies the access token with a unique marker and inspects response headers for reflection. | ||
| impact: | | ||
| Tokens exposed in response headers can be intercepted or logged unintentionally, increasing the risk of unauthorized access and session hijacking. | ||
| category: | ||
| name: MCP_AUTH | ||
| shortName: MCP_AUTH | ||
| displayName: Model Context Protocol (MCP) Security - Broken Authentication | ||
| subCategory: AUTHENTICATION_TOKEN_REFLECTION_IN_HEADERS_MCP | ||
| severity: HIGH | ||
| tags: | ||
| - Authentication | ||
| - Token leakage | ||
| - Business logic | ||
| - OWASP top 10 | ||
| references: | ||
| - https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html | ||
| - https://owasp.org/www-community/attacks/Information_exposure_through_response_headers | ||
| cwe: | ||
| - CWE-200 | ||
| cve: | ||
| - CVE-2023-1644 | ||
| attributes: | ||
| nature: INTRUSIVE | ||
| plan: PRO | ||
| duration: FAST | ||
| api_selection_filters: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| method: | ||
| eq: POST | ||
| request_payload: | ||
| contains_all: | ||
| - jsonrpc | ||
| - method | ||
| - params | ||
| request_headers: | ||
| for_one: | ||
| key: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets discuss this |
||
| contains_either: "$magic From the request headers, find the key that holds the authorization token. This will typically contain access credentials. Return only the header key name." | ||
| extract: authHeaderKey | ||
| value: | ||
| extract: authHeaderVal | ||
| execute: | ||
| type: single | ||
| requests: | ||
| - req: [] | ||
| validate: | ||
| response_headers: | ||
| contains_either: "$magic Check whether the response headers contains any authentication token value that was passed in the request header (the heder value: ${authHeaderVal}). If there is no exact token matching, then return just empty braces. Else return a list of words with the actual token found in the response header only." | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| --- | ||
| id: MCP_BREAKING_JSON_PARSING | ||
| info: | ||
| name: Breaking JSON Parsing (MCP) | ||
| description: "This test checks whether MCP servers robustly handle unexpected or control characters in JSON input. It evaluates the parser’s resilience when special values like null bytes, invalid Unicode, or control characters are prepended to valid JSON content, identifying risks that could lead to parsing issues or input validation bypasses." | ||
| details: "The test sends API requests with JSON payloads that prepend various special characters — such as null bytes ('\\0'), invalid Unicode sequences, or control characters — to valid JSON content (`userBody`). This helps detect whether the application’s JSON parser or request preprocessing logic is vulnerable to input parsing issues or can be tricked into misinterpreting the payload. The test does not use malformed JSON structures, but focuses on injecting control data that could exploit weak parsers or insufficient input sanitization." | ||
| impact: "Failure to handle special or unexpected characters in JSON payloads can lead to parsing anomalies, denial of service, or bypass of validation logic. An attacker may exploit these weaknesses to disrupt normal operation, trigger unhandled exceptions, or evade input validation. Ensuring strict and predictable JSON parsing is critical to maintaining application stability and security." | ||
| category: | ||
| name: MCP_INPUT_VALIDATION | ||
| shortName: MCP_INPUT_VALIDATION | ||
| displayName: Model Context Protocol (MCP) Security - Input Validation | ||
| subCategory: MCP_BREAKING_JSON_PARSING | ||
| severity: LOW | ||
| tags: | ||
| - Business logic | ||
| - OWASP top 10 | ||
| - HackerOne top 10 | ||
| references: | ||
| - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/ | ||
| - https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html | ||
| - https://owasp.org/www-project-developer-guide/draft/design/web_app_checklist/validate_inputs/ | ||
| cwe: | ||
| - CWE-20 | ||
| cve: | ||
| - CVE-2018-20679 | ||
| - CVE-2019-14271 | ||
| attributes: | ||
| nature: INTRUSIVE | ||
| plan: PRO | ||
| duration: FAST | ||
| api_selection_filters: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| method: | ||
| eq: POST | ||
| and: | ||
| - request_payload: | ||
| for_one: | ||
| extract: userBody | ||
| - request_payload: | ||
| for_one: | ||
| key: | ||
| regex: .* | ||
| - request_payload: | ||
| contains_all: | ||
| - jsonrpc | ||
| - method | ||
| - params | ||
| wordLists: | ||
| attemptValues: | ||
| - "\0" | ||
| - "\ufffe" | ||
| - "\uffff" | ||
| - "null" | ||
| - undefined | ||
| - "{" | ||
| - "}" | ||
| - "[" | ||
| - "]" | ||
| - NaN | ||
| - "\x1f" | ||
| - "\x7f" | ||
| - "\x81" | ||
| - "\ud800" | ||
| - "\udbff" | ||
| - "\udc00" | ||
| - "\udfff" | ||
| - � | ||
| - <script> | ||
| - \u0022 | ||
| responseErrorList: | ||
| - Error | ||
| - Internal Server | ||
| - Failed | ||
| - Unauthorized | ||
| - access denied | ||
| - Forbidden | ||
| - Method Not allowed | ||
| - Gateway timeout | ||
| - request timeout | ||
| - server error | ||
| - server busy | ||
| - authentication error | ||
| - authorization error | ||
| - validation error | ||
| - Permission Denied | ||
| - invalid token | ||
| - token expired | ||
| - session expired | ||
| - session timeout | ||
| - unexpected error | ||
| - unable to process request | ||
| - bad request | ||
| - service unavailable | ||
| - account is locked | ||
| - account is blocked | ||
| - multiple failed attempts | ||
| - Attention Required! | ||
| - CloudFlare | ||
| - "Sorry, you have been blocked" | ||
| execute: | ||
| type: multiple | ||
| requests: | ||
| - req: | ||
| - add_header: | ||
| x-akto-ignore: 123 | ||
| - replace_body: "{}" | ||
| - validate: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| response_payload: | ||
| length: | ||
| gt: 0 | ||
| not_contains: "${responseErrorList}" | ||
| - success: exit | ||
| - failure: x2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this correct? |
||
| - req: | ||
| - add_header: | ||
| x-akto-ignore: 123 | ||
| - replace_body: "${attemptValues}${userBody}" | ||
| - validate: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| response_payload: | ||
| not_contains: "${responseErrorList}" | ||
| - success: vulnerable | ||
| - failure: exit | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| --- | ||
| id: MCP_REMOVE_TOKENS | ||
| info: | ||
| name: Broken Authentication by removing auth token (MCP) | ||
| description: API doesn't validate the authenticity of token. Attacker can remove the auth token and access the endpoint. | ||
| details: | | ||
| "The endpoint appears to be vulnerable to broken authentication attack. The original request was replayed by removing victim's <b>auth</b> token. The server responded with 2XX success codes.<br>" "<b>Background:</b> Authentication is the process of attempting to verify the digital identity of the sender of a communication. Testing the authentication schema means understanding how the authentication process works and using that information to circumvent the authentication mechanism. While most applications require authentication to gain access to private information or to execute tasks, not every authentication method is able to provide adequate security. Negligence, ignorance, or simple understatement of security threats often result in authentication schemes that can be bypassed by simply skipping the log in page and directly calling an internal page that is supposed to be accessed only after authentication has been performed." | ||
| impact: "Broken User authentication is a serious vulnerability. Attackers can gain control to other users’ accounts in the system, read their personal data, and perform sensitive actions on their behalf, like money transactions and sending personal messages." | ||
| category: | ||
| name: MCP_AUTH | ||
| shortName: MCP_AUTH | ||
| displayName: Model Context Protocol (MCP) Security - Broken Authentication | ||
| subCategory: MCP_REMOVE_TOKENS | ||
| severity: HIGH | ||
| tags: | ||
| - Business logic | ||
| - OWASP top 10 | ||
| - HackerOne top 10 | ||
| - MCP | ||
| references: | ||
| - https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/ | ||
| - https://github.com/OWASP/API-Security/blob/master/editions/2023/en/0xa2-broken-authentication.md | ||
| - https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html | ||
| - https://cwe.mitre.org/data/definitions/798.html | ||
| cwe: | ||
| - CWE-287 | ||
| - CWE-306 | ||
| cve: | ||
| - CVE-2023-22501 | ||
| attributes: | ||
| nature: NON_INTRUSIVE | ||
| plan: PRO | ||
| duration: FAST | ||
| api_selection_filters: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| request_payload: | ||
| contains_all: | ||
| - jsonrpc | ||
| - method | ||
| - params | ||
| response_payload: | ||
| length: | ||
| gt: 0 | ||
| method: | ||
| eq: POST | ||
| execute: | ||
| type: single | ||
| requests: | ||
| - req: | ||
| - modify_url: http://mcp.razorpay.com/message | ||
| - remove_auth_header: true | ||
| validate: | ||
| response_code: | ||
| gte: 200 | ||
| lt: 300 | ||
| response_payload: | ||
| not_contains: | ||
| - Error | ||
| - Internal Server | ||
| - Failed | ||
| - Unauthorized | ||
| - access denied | ||
| - Forbidden | ||
| - Method Not allowed | ||
| - Gateway timeout | ||
| - request timeout | ||
| - server error | ||
| - server busy | ||
| - authentication error | ||
| - authorization error | ||
| - validation error | ||
| - Permission Denied | ||
| - invalid token | ||
| - token expired | ||
| - session expired | ||
| - session timeout | ||
| - unexpected error | ||
| - unable to process request | ||
| - bad request | ||
| - service unavailable | ||
| - account is locked | ||
| - account is blocked | ||
| - multiple failed attempts | ||
| - invalid credentials | ||
| - Authentication failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add regex for Authorization key