-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
DoneReady to mergeReady to mergefalse-negativeNuclei template missing valid resultsNuclei template missing valid results
Description
Template IDs or paths
- http/exposures/apis/exposed-mcp-server.yaml
Environment
- OS: Kali
- Nuclei: 3.4.4
Steps To Reproduce
- Create an MCP server on port 8000
- Browse to the SSE endpoint and obtain a
session_id
for the messages endpoint - Run
nuclei -t http/exposures/apis/exposed-mcp-server.yaml --target http://localhost:8000/v1/mcp/messages/?session_id=<sesion_id>
Relevant dumped responses
All the payloads that are sent to the server return
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 35
Content-Type: application/json
Date: Sat, 07 Jun 2025 15:44:20 GMT
Server: uvicorn
{"error":"Could not parse message"}
Anything else?
JSON-RPC can have positional parameters (which are used in this template) or named parameters (Changing to "params": {}
should fix the 400 response)
Even if if the template is changed to include both positional parameters and named parameters the MCP protocol spec states that the response will be a 202 Accepted so this template would fail to detect that
I believe if its updated to send a POST InitializeRequest to the MCP endpoint and the matchers should be updated to detect an InitializeResult (The Mcp-Session-Id
looks like its optional from the spec) (See sequence diagram)
Metadata
Metadata
Assignees
Labels
DoneReady to mergeReady to mergefalse-negativeNuclei template missing valid resultsNuclei template missing valid results