The vulnerability is caused by the logging of sensitive S3 credentials (accessKey and secretKey) by the rancher-backup-operator. By analyzing the patch that fixes this vulnerability, specifically commit 9fc04f18a1dddb9c23321b4883fa344f7aa68bd0, I identified the exact functions responsible for this leakage.
The changes in pkg/objectstore/s3minio.go clearly show where the logging occurs. The function objectstore.SetS3Service logged the S3 access key. The patch redacts this key before logging. The function objectstore.GetS3Client logged the access key at the debug level and the secret key at the trace level. The patch redacts the access key and removes the secret key from the log message entirely.
Therefore, during the operation of the backup operator, these two functions, objectstore.SetS3Service and objectstore.GetS3Client, would be invoked, leading to the exposure of sensitive credentials in the logs if the appropriate log levels are enabled.