Skip to content

Commit cd2566a

Browse files
Stephan Ferraroclaude
andcommitted
Security Release v1.0.4 - Multiple Security Fixes
🔒 SECURITY FIXES: - Fixed command injection vulnerability in SSH operations - Upgraded tmp dependency to 0.2.5 (CVE fix for GHSA-52f5-9888-hmc6) - Added dependency overrides to enforce secure versions 🛡️ Enhanced input validation and sanitization for SSH commands 📦 Updated package-lock.json with secure dependencies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5b9b9c5 commit cd2566a

File tree

4 files changed

+27
-18
lines changed

4 files changed

+27
-18
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.4] - 2025-08-17
9+
10+
### Security
11+
- **SECURITY FIX**: Fixed command injection vulnerability in SSH operations (commit 5b9b9c5)
12+
- **SECURITY FIX**: Upgraded `tmp` dependency to version 0.2.5 to address CVE vulnerability
13+
- Fixed arbitrary temporary file/directory write via symbolic link in `tmp` package (GHSA-52f5-9888-hmc6)
14+
- Added dependency overrides to ensure all transitive dependencies use secure `tmp` version
15+
- Enhanced input validation and sanitization for SSH commands and file paths
16+
17+
### Technical
18+
- Added `tmp: ">=0.2.4"` to devDependencies to force secure version
19+
- Added npm overrides configuration to enforce secure tmp version across entire dependency tree
20+
- Updated package-lock.json to reflect security fixes
21+
822
## [1.0.3] - 2025-06-06
923

1024
### Added

gist_comment.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"body": "**Security Fix Applied**\n\nThank you for reporting this command injection vulnerability. You're absolutely correct about the security issue in the SSH client implementation.\n\n**Issue Confirmed:**\nThe vulnerability existed in `server-simple.mjs` where `exec()` was used with string interpolation:\n- `runRemoteCommand()` - Line 171: `ssh \"${hostAlias}\" \"${command}\"`\n- `uploadFile()` - Line 220: `scp \"${localPath}\" \"${hostAlias}:${remotePath}\"` \n- `downloadFile()` - Line 233: `scp \"${hostAlias}:${remotePath}\" \"${localPath}\"`\n\n**Fix Applied:**\nReplaced all unsafe `exec()` calls with `execFile()` using proper argument arrays:\n- `execFile('ssh', [hostAlias, command], options)`\n- `execFile('scp', [localPath, `${hostAlias}:${remotePath}`], options)`\n- `execFile('scp', [`${hostAlias}:${remotePath}`, localPath], options)`\n\nThis prevents command injection by treating arguments as literal values rather than shell commands.\n\n**Commit:** [5b9b9c5](https://github.com/aiondadotcom/mcp-ssh/commit/5b9b9c5) - Fix command injection vulnerability in SSH operations\n\nThe fix maintains full functionality while eliminating the security risk. Thank you for the responsible disclosure!"
3+
}

package-lock.json

Lines changed: 5 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aiondadotcom/mcp-ssh",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "MCP Agent for managing SSH hosts - A Model Context Protocol server for SSH operations",
55
"main": "server-simple.mjs",
66
"bin": {
@@ -48,7 +48,11 @@
4848
"@anthropic-ai/dxt": "^0.2.5",
4949
"@types/node": "^20.11.26",
5050
"@types/ssh2": "^1.15.0",
51+
"tmp": ">=0.2.4",
5152
"ts-node": "^10.9.2",
5253
"typescript": "^5.4.3"
54+
},
55+
"overrides": {
56+
"tmp": ">=0.2.4"
5357
}
5458
}

0 commit comments

Comments
 (0)