Skip to content

v2.0.1 - Parnassius mnemosyne

Choose a tag to compare

@SMEWebify SMEWebify released this 06 Oct 21:39
· 409 commits to WEM-2.0 since this release

Security release. All instances should upgrade: one of the fixes closes routes that were reachable without an account since v1.18.

⚠️ Read before upgrading from v2.0.0

  • No migration. php artisan backup:run before deploying remains the reflex.
  • New direct dependency: ezyang/htmlpurifier. Run composer install (it was already installed through phpspreadsheet).
  • Products permission now enforced. The product catalogue requires the products-menu permission. Before this release, the permission only hid the menu entry. Check that every role meant to manage products has it, or its users will get a 403. Product lookups on quote, order and purchase lines stay open to every role.
  • Downloads instead of inline display. Files outside the inline-safe list (pdf, images, svg) are now always downloaded instead of opening in a tab: txt, csv, docx, json, xml and similar.
  • Do not php artisan route:cache. It breaks mcamara localization.

Security

Advisory Severity Issue
GHSA-mfj6-fvcg-r274] High Missing authentication on document email, PDF preview, email templates and global search routes (since 1.18)
GHSA-cqq2-7c22-p2gg High Stored XSS via attacker-controlled Content-Type on file serving
GHSA-cvm4-63hj-966j High Stored XSS via SVG upload on legacy picture endpoints
GHSA-8fp9-7236-m69r High DOM-based XSS via SVG in the nesting view
GHSA-fp5p-mpqh-7fvx High Stored XSS in the email template compose view
GHSA-rqxq-q992-xj2h High Broken access control on Products

Thanks to @redhotchilihacker1 for the reports.

Details

  • Authentication: /{type}/{id}/email, its send action, /email/preview.pdf, admin/emails/templates/* and /navbar/search now require authentication. Rows in email_logs with sent_by_user_id IS NULL were sent without an authenticated user. Check yours.
  • File serving: the Content-Type is derived server-side from the stored extension and never taken from the upload; non-inline formats are sent as opaque attachments. Legacy file URLs get the same nosniff + sandbox CSP headers.
  • SVG: refused on every image upload written under public/. The document manager still accepts SVG, stored outside the web root and served sandboxed. Remove any .svg already present under public/images/ and storage/app/public/images/, because nginx keeps serving those directly.
  • Nesting: an uploaded SVG is only measured through a copy reduced to its geometry, so it is never attached to the page.
  • Email templates: content sanitised with HTMLPurifier when written and when read, which also cleans existing templates.
  • Products: products-menu is enforced on the catalogue and on attaching documents to a product through the document manager.

Full Changelog: v2.0.0...v2.0.1