cloudflare / cloudflare/mcp-server-cloudflare

Possible unsanitized path in sandbox.container.app.ts

Open
#401 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.2k
Forks
514
Avg merge
1d 21h
Merged PRs (30d)
2

Description

While building mcp-customs (https://github.com/mcpcustoms/mcp-customs), an open-source scanner for MCP servers, I ran it against this repo. It flagged a file read and a file write in sandbox.container.app.ts that both take a variable named reqPath directly into fs.readFile/fs.writeFile, without an obvious sanitization step in that file.

I haven't traced the full call path to confirm whether reqPath is constrained upstream, so this may well be a non-issue — flagging it because it's a 5-minute check for someone who knows the codebase, not because I'm confident it's exploitable.

No action needed if it's already handled elsewhere — just wanted to put it in front of someone who'd know.

Contributor guide

Open the contributing guide

Research direction

Start in sandbox.container.app.ts and inspect the fs.readFile and fs.writeFile calls that receive reqPath. Trace where reqPath comes from and whether it is constrained upstream; done means confirming the path is handled elsewhere or identifying the missing sanitization, with no change needed if it is already safe.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.