MCP Scanner
ScanLeaderboardDocsSign in
Home/executeautomation/mcp-playwright/Results
0F

mcp-playwright

executeautomation/mcp-playwright

76 files · 21 findings

Share GitHub SARIF JSON
1 critical8 high11 medium1 low
Tool Poisoning1 issue
Command Injection2 issues
Path Traversal4 issues
SSRF6 issues
Credential Theftclean
Excessive Permissionsclean
Missing Auth8 issues
Supply Chain
Command Injection2

child_process import with unsanitized usage

high

Direct usage of child_process module methods with variable arguments may allow command injection.

run-tests.js:1
const { execSync } = require('child_process');
How to fix

Use execFile with explicit argument arrays instead of child_process with string commands.

SSRF6

Request to localhost or loopback address

high

Requests targeting 127.0.0.1, localhost, or [::1] may access internal services not intended to be exposed.

src/http-server.ts:226
sse: `http://localhost:${port}/sse`,
How to fix

Block requests to localhost and loopback addresses. Implement URL validation that rejects 127.x.x.x and ::1.

Missing Auth8

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/http-server.ts:200
app.get('/sse', (req, res) => handleSseConnection('/sse', '/messages', req, res));
How to fix

Add authentication middleware to all routes that access or modify data.

Path Traversal4

fs operations without path sanitization

medium

File system operations using variables without prior path validation or sanitization may allow traversal attacks.

src/logging/logger.ts:56
fs.mkdirSync(logDir, { recursive: true });
How to fix

Add path sanitization before all fs operations. Validate paths against an allowlist of permitted directories.

Tool Poisoning1

HTML comment injection in tool description

critical

HTML comments in tool descriptions may contain hidden instructions intended to influence LLM reasoning.

src/tools/browser/visiblePage.ts:187
output = output.slice(0, maxLength) + '\n<!-- Output truncated due to size limits -->';
How to fix

Remove HTML comments from description strings. Use source code comments instead.

clean
Rug Pullclean

child_process import with unsanitized usage

high

Direct usage of child_process module methods with variable arguments may allow command injection.

src/toolHandler.ts:7
import { spawn } from 'child_process';
How to fix

Use execFile with explicit argument arrays instead of child_process with string commands.

Request to localhost or loopback address

high

Requests targeting 127.0.0.1, localhost, or [::1] may access internal services not intended to be exposed.

src/http-server.ts:227
messages: `http://localhost:${port}/messages`,
How to fix

Block requests to localhost and loopback addresses. Implement URL validation that rejects 127.x.x.x and ::1.

Request to localhost or loopback address

high

Requests targeting 127.0.0.1, localhost, or [::1] may access internal services not intended to be exposed.

src/http-server.ts:228
mcp: `http://localhost:${port}/mcp`,
How to fix

Block requests to localhost and loopback addresses. Implement URL validation that rejects 127.x.x.x and ::1.

Request to localhost or loopback address

high

Requests targeting 127.0.0.1, localhost, or [::1] may access internal services not intended to be exposed.

src/http-server.ts:229
health: `http://localhost:${port}/health`,
How to fix

Block requests to localhost and loopback addresses. Implement URL validation that rejects 127.x.x.x and ::1.

Request to localhost or loopback address

high

Requests targeting 127.0.0.1, localhost, or [::1] may access internal services not intended to be exposed.

src/http-server.ts:254
"url": "http://localhost:${port}/mcp",
How to fix

Block requests to localhost and loopback addresses. Implement URL validation that rejects 127.x.x.x and ::1.

Request to localhost or loopback address

high

Requests targeting 127.0.0.1, localhost, or [::1] may access internal services not intended to be exposed.

src/index.ts:47
"url": "http://localhost:8931/mcp",
How to fix

Block requests to localhost and loopback addresses. Implement URL validation that rejects 127.x.x.x and ::1.

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/http-server.ts:201
app.post('/messages', (req, res) => handlePostMessage('/messages', req, res));
How to fix

Add authentication middleware to all routes that access or modify data.

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/http-server.ts:204
app.get('/mcp', (req, res) => handleSseConnection('/mcp', '/mcp', req, res));
How to fix

Add authentication middleware to all routes that access or modify data.

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/http-server.ts:205
app.post('/mcp', (req, res) => handlePostMessage('/mcp', req, res));
How to fix

Add authentication middleware to all routes that access or modify data.

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/http-server.ts:208
app.get('/health', (req, res) => {
How to fix

Add authentication middleware to all routes that access or modify data.

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/monitoring/system.ts:171
this.app.get('/health', (req: Request, res: Response) => {
How to fix

Add authentication middleware to all routes that access or modify data.

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/monitoring/system.ts:179
this.app.get('/metrics', (req: Request, res: Response) => {
How to fix

Add authentication middleware to all routes that access or modify data.

Server route without authentication middleware

medium

HTTP endpoints defined without authentication middleware may be accessible to unauthorized users.

src/monitoring/system.ts:185
this.app.get('/ready', (req: Request, res: Response) => {
How to fix

Add authentication middleware to all routes that access or modify data.

fs operations without path sanitization

medium

File system operations using variables without prior path validation or sanitization may allow traversal attacks.

src/logging/logger.ts:279
fs.unlinkSync(oldFile); // Delete oldest file
How to fix

Add path sanitization before all fs operations. Validate paths against an allowlist of permitted directories.

path.join/resolve with user-controlled input

low

Using path.join or path.resolve with variables from user input without validation can lead to directory traversal.

src/tools/browser/output.ts:16
path: path.resolve(args.outputPath || '.', filename),
How to fix

Sanitize user input before passing to path.join/resolve. Use path.normalize() and check for '..' sequences.

fs operations without path sanitization

medium

File system operations using variables without prior path validation or sanitization may allow traversal attacks.

src/tools/browser/screenshot.ts:46
fs.mkdirSync(downloadsDir, { recursive: true });
How to fix

Add path sanitization before all fs operations. Validate paths against an allowlist of permitted directories.