KC-1412: Fix email-config title lookup so shared-in records cannot redirect --send-email SMTP - #2296
Open
sshrushanth-ks wants to merge 2 commits into
Open
Conversation
Shared-in records titled like an email config could redirect record-add --send-email SMTP delivery. Only owned configs are eligible now, and missing configs fail with a clear error.
warning text, and cover record-add / pam rotate not-found paths.
sshrushanth-ks
marked this pull request as ready for review
August 17, 2026 09:16
sshrushanth-ks
requested review from
amangalampalli-ks,
pvagare-ks and
sali-ks
August 17, 2026 09:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed
record-add --send-emailso email configuration is resolved only from records owned by the current account. Config lookup matched on title across the visible record cache, so a shared-in login titled like an email config (with__email_config__and attacker SMTP settings) could send the onboarding mail and share URL through an attacker-controlled server.Changes
email_commands.py: Updatedfind_email_config_record()to skip non-owned / shared-in matches and warn when ignoring themrecord_edit.py: Fail early inrecord-addvalidation withEmail configuration "..." not foundwhen no owned config existsdiscoveryrotation.py: Same clear not-found error on thepam action rotateemail-config validation pathtest_email_config_ownership.py: Added unit tests covering owned, shared-in, and missing owner-cache selection