Skip to content

phpwcms v1.12.8

Latest

Choose a tag to compare

@slackero slackero released this 18 Nov 21:52
a64f2ea

Security release for the 1.12 line.

🔒 Security

  • Form upload extension check: the public Form upload validated the extension of the raw multipart name but stored sanitize_filename() of it. A name such as marker.php. had no extension for the deny list, while the cleaning removed the trailing dot and wrote <time>_marker.php into the web-served content/form/ folder. The PHP opening tag scan read only the first 8192 bytes, and content/form/.htaccess is inert when the web server runs with AllowOverride None (the stock Debian Apache default), so that file could execute. The extension check and both accept/exclude regexps now run against the stored file name, the deny list also covers php2, php6, php9, shtml and shtm, the tag scan reads the whole file in chunks, and the stored name carries a random component so it is no longer derivable from the response time.

🧹 Update

Revision r563 quarantines uploads that are already stored with an executable extension. Files are moved, not deleted: they are renamed with a .quarantine suffix into content/tmp/.form-upload-quarantine/<timestamp>/, the result is reported in the update output and the folder denies web access. Review that folder after updating and restore anything legitimate.

Database revision moves to r563; no schema change. Requires PHP 8.2+.