Repository navigation
Security release for the 1.12 line.
🔒 Security
- Host header poisoning of mailed links (GHSA-x5fx-f274-39p8):
X-Forwarded-Hostis believed only when the request comes from atrusted_proxiesentry, the resulting host is validated and the new$phpwcms['trusted_hosts']allowlist is honoured. Every mailer that embeds an absolute link — password reminder, form double opt-in, newsletter verification, guestbook notification, e-card, profile notifications, feed import status, backend newsletter send — usesphpwcms_mail_site_url()and skips the mail when the site URL came from an unverified request host. The setup wizard stores the detected URL insitewhen the field is left empty. - Local file disclosure via form attachments (GHSA-9mvh-hxj5-9fgg): only a field declared as
uploadmay carryfolder,nameandattachmentmetadata, and the resolved file must passrealpath()containment insidePHPWCMS_ROOT. Array POST values keep their values but never their keys; the same gate protects the error-path file deletion. - Inline download of uploaded files (GHSA-rmf4-vf3j-hq8g): inline rendering is limited to an extension allowlist (raster images, PDF, plain text/CSV, audio and video), everything else is delivered as attachment. The stored MIME type, client controlled at upload, no longer decides the disposition —
dl_file_resume()re-detects withfileinfoand downgrades to attachment when the type can execute scripts.download.php?file=ignores?type=for inline responses and both delivery paths sendX-Content-Type-Options: nosniff.
Database revision stays at r555; no migrations. Requires PHP 8.2+.