Repository navigation
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.phpserved any image below the private archive and joined the unauthenticatedimgdirparameter to the root with a single../strip. Directory access is resolved throughphpwcms_image_dir_path()and limited to the root, and archive files follow the same public, active, non-trashed andf_granted=0rule as_getFileInfo(). - Frontend image grant check:
img/cmsimage.phpfiltered onlyf_public, so images restricted to logged-in frontend users were served anonymously. - Glossary template traversal: a stored
glossary_templatesuch as../../../../index.phpwas read withfile_get_contents(). The name is resolved throughphpwcms_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 withjs_inline_string(). - Article visibility ownership:
act_articlecontent.phpcase 3 changedarticle_aktivby 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
LIKEpattern, 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 withhash_equals(). - Content Part 21 local file read: the manual page address accepted
file://and other local stream wrappers. Onlyhttpandhttpsare accepted now, when saving and ininclude_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/andtests/. 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 1071because the fullvarchar(1000)alias indexes need 4000 bytes.article_alias,acat_aliasandcalendar_refidare capped atvarchar(500); revisionr568truncates longer aliases duplicate-free first and then shrinks the columns. - Multibyte alias truncation:
proof_aliasis cut withmb_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:
- GHSA-cx22-h9mj-x432 — img/random_image.php: unrestricted access to caller-selected archive images
- GHSA-vf78-4qc9-mgj8 — img/random_image.php: path traversal reads images outside the application root
- GHSA-9wxr-jcrj-j6vc — img/cmsimage.php: missing frontend grant check exposes restricted images
- GHSA-j52f-5994-j8mx — Glossary template traversal permits local-file disclosure
- GHSA-f5cw-xh8w-pvjj — Timestamp-seeded Content Part 28 password reset enables account takeover
- GHSA-vv25-3jh4-fw2p — Private file listing XSS via copyright metadata
- GHSA-555f-prgg-6g47 — Backend article status toggle permits cross-owner publication
- GHSA-p953-wpxf-h7c6 — Missing per-form authorization in the backend form-results export
- GHSA-28j7-mvfw-35pw — Authenticated local file disclosure through Content Part 21
- GHSA-f3vf-5639-qg4p — Anonymous form upload stores scriptable HTML on the application origin