github slackero/phpwcms v1.12.9
phpwcms v1.12.9

latest releases: v2.0.0-beta.7, v1.9.55
41 minutes ago

Security release for the 1.12 line. It closes access-control, traversal and information-disclosure gaps in the frontend image and form paths, the backend export and tooltip code, and the shipped web server configuration.

🔒 Security

  • Password reminder tokens: Content Part 28 replaced the account password during an anonymous reminder request and mailed the new value. It now issues a single-use token (stored as SHA-256 hash, one-hour expiry, older tokens dropped, rate limited per IP) and changes the password only after the token is submitted with a new one. Shipped templates use {RESET_URL}.
  • Random image archive visibility and path traversal: img/random_image.php served any image below the private archive and joined the unauthenticated imgdir parameter to the root with a single ../ strip. Directory access is resolved through phpwcms_image_dir_path() and limited to the root, and archive files follow the same public, active, non-trashed and f_granted=0 rule as _getFileInfo().
  • Frontend image grant check: img/cmsimage.php filtered only f_public, so images restricted to logged-in frontend users were served anonymously.
  • Glossary template traversal: a stored glossary_template such as ../../../../index.php was read with file_get_contents(). The name is resolved through phpwcms_template_file_path(), which rejects absolute paths, stream wrappers, traversal and symlink escapes.
  • Private file tooltip XSS: the file name and copyright were HTML-encoded but injected into a single-quoted inline Tip() call, so an apostrophe ended the string and executed markup in an administrator session. Both values are escaped with js_inline_string().
  • Article visibility ownership: act_articlecontent.php case 3 changed article_aktiv by article id without an owner check, so a non-admin could publish another user's article.
  • Form export authorization and key comparison: the non-API export branch did not check the requested form, and the direct-download key was matched through an unescaped SQL LIKE pattern, so wildcards matched any stored key. The form must belong to an article the user owns, and the key is validated as alphanumeric and compared with hash_equals().
  • Content Part 21 local file read: the manual page address accepted file:// and other local stream wrappers. Only http and https are accepted now, when saving and in include_url().
  • Upload executable extensions: the backend upload paths and the FTP takeover accepted server-executed extensions. One shared extension list checks every dot-separated segment, and the takeover checks the file before it becomes executable in the web-served storage.
  • Web server default-deny: Apache, nginx and IIS deny HTTP access to content/{tmp,cache,log,backup}, include/config, include/vendor, upload/, filearchive/ and tests/. nginx and IIS use an explicit allowlist now, so renaming a private directory no longer exposes it, and PHP execution is blocked inside private and upload directories.

🐛 Fixed

  • Alias and refid key length: fresh utf8mb4 installs failed with ERROR 1071 because the full varchar(1000) alias indexes need 4000 bytes. article_alias, acat_alias and calendar_refid are capped at varchar(500); revision r568 truncates longer aliases duplicate-free first and then shrinks the columns.
  • Multibyte alias truncation: proof_alias is cut with mb_substr() now, so a UTF-8 sequence is not split.
  • Setup HTML escaping: the manual setup escaper no longer double-encodes named and hex entities, and substitutes invalid UTF-8 like the core wrapper.

🛠️ Changed

  • jQuery 3.8: the backend loads jQuery 3.8.0, and the frontend library set gains jQuery 3.8 (Migrate 3.6.0) and 4.1 (Migrate 4.0.2) in plain, migrate and slim variants. Existing versions stay selectable.

Database revision moves to r568; the alias and refid column shrink is the only schema change. Requires PHP 8.2+.

If you run nginx or IIS, review the updated nginx.conf/web.config: they now serve only an explicit allowlist of public paths.

Security advisories

Each fixed issue has a published GitHub security advisory:

Don't miss a new phpwcms release

NewReleases is sending notifications on new releases.