v2026.5.10 — Security hardening patch
Security hardening patch — five fixes from external security review
Fixed
- VS Code extension command injection —
exec()replaced withexecFilethroughoutscanner.ts. Binary path and args passed as argv array, never interpolated into a shell string. Shell metachar validation added onmedusaPath(rejects;|&\$()<>`). --fail-onignored cached findings —total_issuesnow counts cached scan results. Previously a re-scan with--fail-on highwould silently pass if findings were cached.--fail-oncrashed on dict-backed findings —_get_severity()helper handles both object (.severity) and dict (.get('severity')) issue shapes.- Tool cache returned stale dummy path —
_find_tool()callsshutil.which()to verify the cached tool exists before trusting it. Stale entries are evicted. - Full-file hash when
--fail-onactive — cache previously hashed only first 8 KB. Changes beyond that were invisible to threshold checks. - User-home MCP configs opt-in —
~/.config/Claude/claude_desktop_config.jsonand~/.cursor/mcp.jsonnow require--include-user-mcp-configs(were silently included in every scan).
Security
- VS Code extension: eliminated OS command injection vector in all three scan entry points. CVSS 3.1 estimate: 8.8 (High) → 0.
- Scanner core:
--fail-onthreshold now reliable in CI pipelines regardless of caching state.
Full changelog: https://github.com/Pantheon-Security/medusa/blob/main/CHANGELOG.md