[MEDIUM] Docker SSH force command uses eval for command execution #26
Labels
No labels
area:documentation
area:infrastructure
area:network
area:security
priority:critical
priority:high
priority:low
priority:medium
status:blocked
type:bug
type:deployment
type:enhancement
type:investigation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
reinitialized.net/infrastructure#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Labels: area:security, area:containers, priority:medium, type:bug
Description
In modules/profiles/containers/default.nix line 19, the docker SSH validator uses:
eval ""
While the case statement restricts matching to docker/scp/sftp commands, eval could potentially be exploited through command chaining or shell metacharacters.
Impact
Carefully crafted SSH_ORIGINAL_COMMAND could bypass the allowlist through shell injection.
Recommended Fix
Replace eval with direct execution of matched commands. Whitelist specific command patterns more strictly without shell interpolation.