torch_npu
Warn
Audited by Gen Agent Trust Hub on Mar 1, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The
fetch_torch_npu_docandfetch_torch_npu_docs_batchtools inmcp/index.jsare vulnerable to path traversal. The tools use thepath.joinfunction to determine the save location for fetched files using a user-providedpathargument. The sanitization logic only removes leading slashes and replaces backslashes, failing to prevent directory traversal via../sequences, which allows arbitrary file writes outside the intendedfetched_docsdirectory. - [COMMAND_EXECUTION]: The installation instructions in
mcp/README.mdadvise users to executeSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. This modifies the system security configuration on Windows to allow the execution of unsigned scripts, increasing the potential attack surface of the host environment. - [EXTERNAL_DOWNLOADS]: The MCP server retrieves content from the external domain
gitcode.com/Ascend/pytorchvia thefetchUrlfunction. While GitCode is a known service, the skill downloads and writes this remote content to the local filesystem without verifying its integrity or safety. - [PROMPT_INJECTION]: The skill presents an indirect prompt injection surface (Category 8).
- Ingestion points: Remote documentation content is ingested from GitCode via the
fetchUrlfunction inmcp/index.js. - Boundary markers: None are implemented to isolate the fetched content or identify it as untrusted data to the agent.
- Capability inventory: The skill has file system write capabilities via
fs.writeFileSyncacross its fetching tools. - Sanitization: The skill lacks proper sanitization for both the file paths and the content retrieved from the remote source.
Audit Metadata