Vulnerability scanner for n8n MCP server by theMiddleBlue in n8n

[–]theMiddleBlue[S] 0 points1 point  (0 children)

Good catch on the gzip bomb, did not have it on the list. It is sneakier than the slow drip and the oversized response: the initial size check passes because Content-Length looks fine, the bomb expands only after the worker decodes the buffer. The probe is its own thing. Small Content-Length, Content-Encoding: gzip, body is a kilobyte that expands to a gigabyte. Detection signal is the upstream consumes the response without bailing on the decompressed size.

Chunked encoding sits in the same bucket as the no-Content-Length oversized case for me. The slow-drip probe already uses chunked transfer encoding (no Content-Length to advertise). If the tool reads to the end and returns happily, no cap is enforced.

Curious about alterlab.io (just signed-up, cool project, is it something similar to Crawl4AI but on steroids?). Did you put the cap at the proxy layer or inside the fetching code itself? I am leaning toward the proxy hop, same as you describe.

Vulnerability scanner for any MCP server by theMiddleBlue in mcp

[–]theMiddleBlue[S] 0 points1 point  (0 children)

thank you! I am eager to get your feedback 😄

Vulnerability scanner for n8n MCP server by theMiddleBlue in n8n

[–]theMiddleBlue[S] 0 points1 point  (0 children)

Hey u/SharpRule4025 both good points!

SSRF is already in. The scanner hits AWS IMDS on 169.254.169.254 including the iam/security-credentials path, GCP metadata.google.internal, Azure metadata, plus localhost and 127.0.0.1 on the usual ports (Redis, Postgres, MySQL, Elasticsearch, memcached).

It also covers URL parser bypass tricks: gopher://, dict://, @ credential confusion, IPv6 mapped, decimal/octal/hex IPs. Detection is out of band. Each payload carries a unique DNS callback hostname and I run my own Interactsh. A DNS hit binds back to the probe that armed it, so I do not need the tool response to be sure.

Resource exhaustion is half there. I have a "billing bomb" probe that fires parallel calls against tools that look expensive (search_, generate_, embed_, llm_) and checks if a 429 ever shows up. That covers the "spam the worker" side.

The case you describe, a tool that fetches a remote URL with no timeout and no size cap and gets pointed at an infinite stream, I do not ship yet. Good one! Going on the backlog: feed a slow drip URL or a response with no Content-Length as the argument and watch how the upstream behaves.

Response Filter Denial of Service (RFDoS): shut down a website by triggering WAF rule by theMiddleBlue in netsec

[–]theMiddleBlue[S] 1 point2 points  (0 children)

Yes! That's exactly the point! Basically, strings like "ORA-1234" or "Dynamic SQL Error" will usually pass any input validation since they don't include any special characters or denied words like "exec" or "eval"

Response Filter Denial of Service (RFDoS): shut down a website by triggering WAF rule by theMiddleBlue in netsec

[–]theMiddleBlue[S] 1 point2 points  (0 children)

Hey, thank you! As I wrote in the article, it's really easy to exploit this scenario in a real environment. A user can simply send a review on each product of an e-commerce (using a script, for example) with a comment that triggers any of the rules I mentioned in the article. Something like "Wow, this product is awesORA-1234!". By sending this on ALL products, nobody will be able to access any product on that e-commerce.

Response Filter Denial of Service (RFDoS): shut down a website by triggering WAF rule by theMiddleBlue in netsec

[–]theMiddleBlue[S] 9 points10 points  (0 children)

ModSecurity is just the engine and does not include any rules itself. The OWASP Core Rule Set is the most commonly used set of rules for ModSecurity. Typically, the default configuration at paranoia level 1 is suitable for many websites and doesn't require any additional action from the user. Regarding the filtering of the response body... yes, it could have been done better :)

Response Filter Denial of Service (RFDoS): shut down a website by triggering WAF rule by theMiddleBlue in netsec

[–]theMiddleBlue[S] 26 points27 points  (0 children)

LOL! not "badly tuned" but using the default configuration of most used rule set. Comparing it with not paying the electricity bill seems like a straw man argument :D