You can report a vulnerability at https://helpdesk.peopleinside.it You can use the live chat or the ticket system.
- Missing
debugErrorMessage()helper on login/account error paths. AddeddebugErrorMessage()inindex.phpso failed login attempts,add_account,edit_account, andtest_credentialserrors safely return generic messages in production (whendebugis disabled) instead of throwing an undefined-function fatal error. - Database relocation & multi-user privilege hardening. Restricted
move_databaseanddismiss_db_warningto the primary administrator (user_id === 1), while keeping safe hardening actions (fix_permissions,enable_captcha) accessible to authenticated users via the security alert banner.Config::moveDatabase()now validates target filenames (.db,.sqlite,.sqlite3), strips control characters, and refuses paths inside the webroot. - Case-insensitive login rate-limiting & user lookup. Normalized email/username casing (
LOWER(...)) inAuth::loginWithImap(),isBanned(),recordFailedAttempt(), andclearAttempts()so letter-case variations cannot bypass the 5-attempt lockout window. - SMTP sender & folder control-character sanitization. Stripped
\r,\n, and\0fromFrom:/Disposition-Notification-To:inSmtpClient::buildRaw()and from folder management inputs (create_folder,rename_folder,delete_folder); addedFILTER_VALIDATE_EMAILvalidation onadd_accountandedit_account. - 2FA pre-auth CSRF & HTML sanitizer defense in depth. Added a session-bound
login_2fa_csrftoken onlogin2fa, and updatedsanitizeHtml()to strip HTML comments and legacy raw-text tags (noembed,noframes,xmp,plaintext).
- Sandboxed email &
.emlrendering. Replaced Shadow DOM / direct HTML injection with<iframe sandbox="allow-popups allow-popups-to-escape-sandbox" referrerpolicy="no-referrer">populated viasrcdocacross message view, modal.emlpreview, and standalone.emlpreview. - Trusted proxy HTTPS detection & TOTP enrollment hardening.
Config::isRequestSecure()honorsX-Forwarded-*headers only whenREMOTE_ADDRmatches configuredtrusted_proxies; removed client-modifiable hidden TOTP secret/recovery fields insettings.phpand compared hashed session tokens withhash_equals(). - SSRF & IMAP host takeover protection. Added
HostValidator::validateHostAndPort()(blocking private/loopback/link-local/metadata ranges unlessallow_private_mail_hostsis enabled) and prevented login against arbitrary IMAP hosts whenhide_server_on_loginis active or when an existing primary account is bound to another host.
- SMTP command injection (CRLF) in outgoing mail recipients.
SmtpClient::extractAddress()did not strip CR/LF characters before using the value to buildRCPT TO:<...>SMTP commands. An authenticated user could craft a "To"/"Cc"/"Bcc" value containing\r\nto inject additional SMTP commands (e.g. add a hidden recipient not visible in the message headers or application logs). Fixed by stripping CR/LF/NUL at the start ofextractAddress(), consistent with the existingsanitizeHeader()helper. - HTML sanitizer: legacy
background/lowsrcattribute bypass.sanitizeHtml()did not strip the obsoletebackgroundandlowsrcHTML attributes, which old browser engines (pre-modern IE/Gecko) resolved asjavascript:URLs. Not exploitable on current browsers, but removed for defense in depth and to cover non-standard/legacy clients. These attributes have no legitimate use in HTML5 markup. - HTML sanitizer: whitespace-split
javascript:bypass instyleattributes. Astylevalue such asbackground:url(java\nscript:alert(1))evaded thejavascript:/vbscript:/expression(...)substring checks because the keyword was split by whitespace. CSS ignores such whitespace inside tokens, so the check now normalizes whitespace before testing for dangerous keywords; not exploitable on current browsers (modern engines no longer executejavascript:fromurl()), fixed for defense in depth.