You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sec(email): SES registration subject still built from unsanitized AccountName (PR #523 fixed only SMTP path) #544
Discovered while auditing PR #523 (which closes #401).
PR #523 wraps data.AccountName and data.Provider in sanitizeHeader() in the SMTP path (internal/email/smtp_sender.go, SendRegistrationReceivedNotification / SendPurchaseApprovalRequest subject construction). However, issue #401 explicitly identifies a second sink that the PR does not touch:
internal/email/templates.go (around line 808) / internal/email/sender.go SES path builds the same CUDly - New Account Registration: %s (%s) subject with the same fmt.Sprintf pattern and passes it directly to the SES API with no sanitizeHeader call.
Per issue #401, the SES path is the more dangerous of the two: sanitizeHeader is only invoked in the SMTP path, so a CR+LF in the attacker-controlled account_name (from the unauthenticated POST /api/register endpoint) reaches SES unstripped. The SMTP fix in #523 leaves this open.
Verification: shipped in PR #566 (SHA 4956d66, merged 2026-05-28). templates.go calls sanitizeHeader(data.AccountName) and sanitizeHeader(data.Provider) in the SES subject construction. handler_registrations.go strips CRLF at input. Regression test in templates_test.go. Confirmed at HEAD of origin/feat/multicloud-web-frontend.
Activity
sec(email): sanitize AccountName/Provider in SES registration subject
sec(email): sanitize AccountName/Provider in SES registration subject
sec(email): sanitize AccountName/Provider in SES registration subject
sec(email): sanitize AccountName/Provider in SES registration subject (…
cristim commentedon May 28, 2026
Verification: shipped in PR #566 (SHA 4956d66, merged 2026-05-28). templates.go calls sanitizeHeader(data.AccountName) and sanitizeHeader(data.Provider) in the SES subject construction. handler_registrations.go strips CRLF at input. Regression test in templates_test.go. Confirmed at HEAD of origin/feat/multicloud-web-frontend.