-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
help wantedExtra attention is neededExtra attention is neededsecuritysystem security vulnerabilitiessystem security vulnerabilities
Description
- Description:
shared/shieldx-common/pkg/database/backup.gobuildsgunzip -c <backupPath> | psql ...usingfmt.Sprintfand executes throughsh. An attacker controlling the backup path or DB settings can inject shell payloads. - Location:
BackupManager.Restorefunction, plain SQL branch whenisCompressedis true. - Recommendation: Avoid
sh -c; stream gzip contents via Go (gzip.NewReader) or callpg_restore/psqlwithexec.CommandContextargument slices. Validate and whitelist paths. - Done when: Restore uses argument-safe invocations, injection strings are rejected, and tests cover malicious paths.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededsecuritysystem security vulnerabilitiessystem security vulnerabilities