Skip to content

[New Advisory] File Upload Path Traversal — Local File Exfiltration in mcp-playwright #7259

@hacnho

Description

@hacnho

Advisory Details

Package: @anthropic-ai/mcp-playwright (npm) / executeautomation/mcp-playwright
Repository: https://github.com/executeautomation/mcp-playwright
CWE: CWE-22 (Path Traversal)
Severity: Medium

Summary

The file upload functionality accepts a local file path parameter without validation. An attacker can use path traversal to read and exfiltrate arbitrary local files by uploading them to an attacker-controlled server.

Details

The file upload tool takes a local file path as input and uploads it to a specified URL. There is no restriction on which local files can be read. Combined with a controlled upload target, this allows exfiltration of any file readable by the MCP server process.

PoC

  1. Use the file upload tool with file path set to /etc/passwd or ~/.ssh/id_rsa
  2. Set the upload target to an attacker-controlled server
  3. The sensitive file is read and uploaded to the attacker

Impact

Arbitrary local file read and exfiltration. An attacker can steal SSH keys, environment files with secrets, database credentials, and any other file accessible to the server process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions