Skip to content

[FALSE-NEGATIVE] http/exposures/apis/exposed-mcp-server.yaml #12269

@domwhewell-sage

Description

@domwhewell-sage

Template IDs or paths

- http/exposures/apis/exposed-mcp-server.yaml

Environment

- OS: Kali
- Nuclei: 3.4.4

Steps To Reproduce

  1. Create an MCP server on port 8000
  2. Browse to the SSE endpoint and obtain a session_id for the messages endpoint
  3. 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 mergefalse-negativeNuclei template missing valid results

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions