getTableCount uses fmt.Sprintf for SQL table name — potential SQL injection #7
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/vaultik#7
Loading…
Reference in New Issue
Block a user
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?
In
snapshot.go,getTableCount()constructs SQL via string formatting:Currently only called with hardcoded table names (
"files","chunks","blobs"), so not exploitable today. However, this is a footgun — if anyone ever passes user input, it becomes SQL injection. Should use a whitelist of allowed table names or parameterize differently.Ref: parent issue #1
Taking this on now. Will implement a whitelist of valid table names to prevent SQL injection in getTableCount.