Description
MCPB File Upload Handler extracts a ZIP file and reads manifest.json from it. The name field in the manifest is directly concatenated into a file path (line 107) without any sanitization or path traversal character validation. An attacker can craft a malicious MCPB file where manifest.name is set to something like ../../../etc/malicious, causing the file to be extracted to an arbitrary location on the file system. The cleanupOldMcpbServer function (line 110) also uses the unsanitized name, potentially allowing deletion of arbitrary directories.
Recommendation
Update the @samanhappy/mcphub package to the latest compatible version. Followings are version details:
- Affected version(s): < 0.12.13
- Patched version(s): 0.12.13
References
Related Issues
- MCPHub has an Improper Authorization vulnerability via its handleSseConnection function - CVE-2025-11287
- i18next-http-backend has Path Traversal & URL Injection via Unsanitised lng/ns - CVE-2026-41691
- jsPDF has Local File Inclusion/Path Traversal vulnerability - CVE-2025-68428
- liquidjs has a path traversal fallback vulnerability - CVE-2026-30952
You might also like:
- Tags:
- npm
- @samanhappy/mcphub


