forked from PatchMon/PatchMon-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't workingcriticalCritical priorityCritical prioritysecuritySecurity vulnerabilitySecurity vulnerability
Description
Description
The `SkipSSLVerify` configuration option allows complete bypass of TLS certificate verification. When enabled, it exposes the agent to man-in-the-middle attacks. This is especially dangerous for binary downloads which could allow injection of malicious binaries.
Locations
- `internal/client/client.go` lines 36-40
- `cmd/patchmon-agent/commands/serve.go` lines 357-363
- `cmd/patchmon-agent/commands/version_update.go` lines 315-322, 377-385
if cfg.SkipSSLVerify {
client.SetTLSClientConfig(&tls.Config{
InsecureSkipVerify: true,
})
}Impact
- Man-in-the-middle attacks possible when TLS bypass is enabled
- Attacker could inject malicious binaries during auto-update
- Complete compromise of agent system
Recommended Fix
- Remove or strongly discourage the `SkipSSLVerify` option
- If it must remain, NEVER apply it to binary downloads
- Implement binary signature verification regardless of TLS setting
- Add more prominent warning when this option is used:
if cfg.SkipSSLVerify {
logger.Error("⚠️ SECURITY WARNING: TLS certificate verification is disabled!")
logger.Error("⚠️ This exposes the agent to man-in-the-middle attacks")
logger.Error("⚠️ Do NOT use in production environments")
}- Consider using certificate pinning for update server
Severity
🔴 CRITICAL - Supply chain attack vector
Labels
security, critical
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcriticalCritical priorityCritical prioritysecuritySecurity vulnerabilitySecurity vulnerability