Описание
Froxlor has an Email Sender Alias Domain Ownership Bypass via Wrong Array Index Allows Cross-Customer Email Spoofing
Summary
In EmailSender::add(), the domain ownership validation for full email sender aliases uses the wrong array index when splitting the email address, passing the local part instead of the domain to validateLocalDomainOwnership(). This causes the ownership check to always pass for non-existent "domains," allowing any authenticated customer to add sender aliases for email addresses on domains belonging to other customers. Postfix's sender_login_maps then authorizes the attacker to send emails as those addresses.
Details
In lib/Froxlor/Api/Commands/EmailSender.php at line 100, when a customer adds a full email address (not a @domain wildcard) as an allowed sender, the code splits on @ and takes index [0]:
For input admin@domain-b.com, explode("@", "admin@domain-b.com") returns ["admin", "domain-b.com"]. Index [0] is "admin" — the local part, not the domain.
The validateLocalDomainOwnership() function (lines 346-355) then queries panel_domains for a domain matching "admin":
Since no domain named "admin" exists in panel_domains, $domain_result is false, and the function returns without error — the ownership check silently passes.
The inserted mail_sender_aliases row is then picked up by Postfix's sender_login_maps query (configured in mysql-virtual_sender_permissions.cf):
This query maps the allowed_sender back to the mail user, authorizing them to send as that address via SMTP.
PoC
The same attack works via the web UI by POST-ing to customer_email.php with action=add_sender and the target domain in allowed_domain.
Impact
Any authenticated customer on a multi-tenant Froxlor instance can add sender aliases for email addresses on domains belonging to other customers. This allows:
- Cross-customer email spoofing: Send emails impersonating users on other customers' domains, bypassing Postfix's
smtpd_sender_login_mapsrestriction that is specifically designed to prevent this. - Multi-tenant isolation breach: The domain ownership check (
validateLocalDomainOwnership) is the only barrier preventing cross-customer sender aliasing, and it is completely ineffective for full email addresses. - Phishing and reputation damage: Spoofed emails originate from the legitimate mail server, passing SPF/DKIM checks for the target domain if those records point to the Froxlor server.
Note: The wildcard (@domain) code path at line 105 is not affected — it correctly passes the domain to validateLocalDomainOwnership().
Recommended Fix
Change index [0] to [1] on line 100 of lib/Froxlor/Api/Commands/EmailSender.php:
This ensures the domain part of the email address is passed to the ownership validation, matching the behavior of the wildcard path on line 105.
Пакеты
froxlor/froxlor
< 2.3.6
2.3.6
Связанные уязвимости
Froxlor is open source server administration software. Prior to version 2.3.6, in `EmailSender::add()`, the domain ownership validation for full email sender aliases uses the wrong array index when splitting the email address, passing the local part instead of the domain to `validateLocalDomainOwnership()`. This causes the ownership check to always pass for non-existent "domains," allowing any authenticated customer to add sender aliases for email addresses on domains belonging to other customers. Postfix's `sender_login_maps` then authorizes the attacker to send emails as those addresses. Version 2.3.6 fixes the issue.
Froxlor is open source server administration software. Prior to versio ...