Skip to content

MCP server listens on every network interface

Partialmedium severity · reads .ts .tsx .js .jsx .mjs .cjs .pyBeta

An agent's tool server usually runs on a developer's machine. On 0.0.0.0, anyone on the same network can call its tools, which often read files and run commands (CWE-1327). When Lintsure finds this, it marks it as Partial: it may be fine, depending on context only you can confirm.

What it looks like

A line Lintsure flags in its own test app:

// src/mcp/server.ts
app.listen(3000, "0.0.0.0");

How to fix it

Listen on 127.0.0.1 unless other machines must reach the server. If they must, require sign-in on every request and put it behind a firewall.

Through a coding agent, Lintsure suggests the change and waits. Nothing is edited until you approve it.

Controls it relates to

  • AST06Weak Isolation
  • OWASP Top 10A02:2025Security Misconfiguration

What the framework asks

AST06: Weak Isolation

Skills and tool servers should run boxed in: local interfaces only, with sign-in, and limited to the files they declare.

Evidence a reviewer may ask for: How each tool server is started, where it listens and who can reach it.

Summaries are our own reading of the public texts, not the official wording.

Check your code for this

Runs on your machine. Your code is never uploaded.

npx lintsure scan

Quickstart · Use it in Claude Code or Cursor

This rule is in Beta: its mapping to framework controls is our own reading of the public texts, not independently reviewed. Lintsure is a readiness tool, not an audit or legal advice. A finding, or the lack of one, doesn't make you compliant. Disclaimer

We improve these rules all the time. If you see a false alarm, a missed problem or anything that could work better, tell us in a review and we will use it to improve your experience.

Related rules

Did this rule flag something that's fine, or miss a real problem? Tell us on GitHub. Every report becomes a test case, so the same mistake can't come back.