Skip to content

v21.0.0-beta5

Pre-release
Pre-release

Choose a tag to compare

@colinmollenhour colinmollenhour released this 30 Nov 08:55
· 7 commits to main since this release

Security

This release fixes 11 security issues: 8 are published with CVE identifiers (requested) and 3 as GitHub Security Advisories only. This pre-release of the 21.x line merges the v20.19.2 security release, and adds one 21.x-only hardening for GHSA-3pv7-jc23-874h. The same fixes ship in v20.18.4.

Scores are CVSS 3.1. Several of these issues let an administrator or API user whose role is limited to one area (Dataflow profiles, sitemaps, catalog, CMS, customers) run code, read server files or take over customer accounts, which the role is meant to keep out of reach. One lets a storefront customer pay with another customer's billing agreement. If you give restricted admin or API roles to people you would not trust with full access, upgrade first.

Advisories with a CVE

Advisory Issue Severity CVE Fixed in
GHSA-3pv7-jc23-874h Block types passed as layout action arguments bypass the admin block check (GHSA-8m3h follow-up) High 7.2 requested 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-22f6-grcr-2h6g Dataflow Zend_Db adapter lets an Advanced Profiles role construct any class and run PHP code High 7.2 requested 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-gc76-8qvx-h92g Dataflow Io adapter file names escape var/import and var/export (file read, SSRF, file write) High 7.2 requested 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-7w9h-fhg7-6v5q Sitemap path dot segment bypasses the protected-path check; a Sitemap-only role can delete local.xml High 7.2 requested 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-2rq4-2cmg-c49h Customer can pay for an order with another customer's PayPal billing agreement High 7.1 requested 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-wx5g-qmmj-cjp4 API calls that create customers, cart customers and custom options save over existing records, letting an API role take over any customer account Medium 6.5 requested 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-85m3-7v29-p4v8 Template method calls get past the getConfig guard and disclose encrypted configuration secrets Medium 5.9 requested 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-9qmw-3wvr-72c4 Product attribute API additional_fields overrides the attribute code, leading to SQL injection Medium 4.9 requested 20.18.4, 20.19.2, 21.0.0-beta5

Advisories without a CVE

These are published so you can track them. Each one either needs an administrator account and crosses no authority boundary, or has low impact.

Advisory Issue Severity Fixed in
GHSA-qpch-7qxj-v632 Restricted back-office roles plant stored XSS that runs for full administrators Medium 6.1 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-2r86-x29g-j8f2 jsQuoteEscape() lets a trailing backslash break out of JavaScript strings Medium 6.1 20.18.4, 20.19.2, 21.0.0-beta5
GHSA-4wh6-4j7q-cqrj Granular ACL gaps in admin order, reorder, product tab, tag and attribute set actions (follow-up) Low 3.8 20.18.4, 20.19.2, 21.0.0-beta5

Behaviour changes and upgrade notes

Review these before you upgrade. Most need no action unless you run Dataflow profiles, SOAP/XML-RPC integrations, custom email templates or restricted admin roles. Each advisory has the full list. Items marked 20.19.x and 21.x only are not in 20.18.4.

Templates and escaping

  • Email and newsletter template expressions. A {{var}} or {{if}} expression may call a method without arguments only if its name starts with get, is or has. A method called with arguments must be declared for its class under global/template/variable_methods. Core declares the calls its own templates use. A refused call renders empty and is logged. Check custom transactional email and newsletter templates that call other methods, and declare those methods in your module's config.xml. While an expression is evaluated, encrypted configuration values read as empty.
  • jsQuoteEscape() doubles backslashes (except before n, r and t) and escapes raw line breaks, U+2028/U+2029, </ and <!--. Input that relied on passing \xNN or \uNNNN through it now shows those sequences literally; pass the real character instead.
  • Varien_Object::serialize() HTML-escapes each value. Varien_Data_Form_Element_Radios and _Checkboxes escape option labels. Mage_Adminhtml_Block_Widget_Tabs::getTabTitle() returns escaped text. removeTags() repeats until the output stops changing, so entity-encoded markup is stripped too.
  • Values that deliberately contain HTML (configurable option labels, order status labels, currency symbols, attribute group names) now show as literal text in the admin.
  • Template overrides. If your theme overrides any of these templates, apply the same changes. Admin: catalog/product/helper/gallery.phtml, catalog/product/tab/inventory.phtml, the downloadable links.phtml and samples.phtml, page/js/calendar.phtml, sales/order/create/data.phtml, sales/order/shipment/packaging/grid.phtml and packed.phtml, sales/order/view/history.phtml, system/config/form/field/array.phtml, widget/tabs.phtml and widget/tabshoriz.phtml. Storefront (base and rwd): catalog/category/view.phtml, catalogsearch/advanced/form.phtml, the cart item renderers (checkout/cart/item/default.phtml, checkout/cart/render/default.phtml and simple.phtml, checkout/cart/minicart/default.phtml, downloadable/checkout/cart/item/default.phtml), checkout/multishipping/addresses.phtml and page/js/calendar.phtml.
  • JavaScript cache. js/mage/adminhtml/product.js and js/mage/adminhtml/sales.js changed. Flush the JavaScript/CSS cache (and any CDN copy) after upgrading.

Layout updates

  • Custom layout updates (products, categories, CMS pages) are refused on save if any argument or attribute value names an admin block or a disallowed_block, calls setArea, or contains the value adminhtml. Stored updates are validated again when the page renders, so a page that carries an old, now-invalid update renders without it, and a warning naming the page is logged.
  • 21.x only: Mage_Core_Model_Layout refuses to create admin blocks in storefront layouts (the admin button block stays allowed). Extensions that render other admin blocks on the storefront must change.

Dataflow and file paths

  • The Zend_Db and Db_Table containers accept only the Pdo_Mysql and Mysqli adapters and pass only connection settings. The CSV and Excel XML parsers' adapter must be a Dataflow adapter.
  • The Io adapter's file type and the profile wizard need a relative file name below the configured path, and path must resolve inside the OpenMage root. Profiles that used an absolute file name or a URL with type="file" must switch to the ftp/sftp type or the HTTP cURL adapter.
  • Mage_Core_Model_File_Validator_AvailablePath normalises paths before matching, refuses schemes, drive letters, NUL bytes and trailing .., and matches protected directories case-insensitively. Sitemaps validate the normalised path on save, generate and delete; a sitemap that already points into a protected directory is no longer generated or deleted from disk.
  • 20.19.x and 21.x only: Varien_Io_File refuses stream wrappers when confining writes, and confines read() to the working directory after open() or cd().

APIs

  • customer.create refuses a customer id and writes only the attributes the API exposes. cart_customer.set refuses a customer id in register and guest mode, and cart.order won't register a new customer over an existing one. The custom option add calls always add new options and values.
  • The product attribute API accepts only attribute properties at the top level and in additional_fields; it ignores the code, ids, entity type, backend type and backend, source and frontend models. New attribute codes saved through the model must start with a letter and contain only letters, digits and underscores.
  • The product attribute set API refuses sets of other entity types and groups or attributes from another set, and strips tags, quotes and backticks from group names.

Payments

  • An order paid by billing agreement needs an active agreement of the ordering customer, at checkout, multishipping, admin order creation and the API.
  • 20.19.x and 21.x only: Mage_Payment_Model_Method_Abstract::assignData() no longer copies posted keys that hold internal payment state (Mage_Payment_Model_Method_Abstract::INTERNAL_INFO_KEYS). Third-party payment methods that post payment[additional_information] or payment[additional_data] must copy them in their own assignData().

Admin roles

  • Printing order documents, loading the comment history and the order view's tab grids need Sales › Orders › Actions › View. Reorder-only roles cannot change the reorder's customer or store.
  • Roles that hold only Manage Ratings, Pending Reviews or Pending Tags lose the Reviews and Tags tabs on the product and customer edit pages: those tabs need All Reviews and All Tags. Pending Tags roles cannot act on tags that are not pending.
  • The attribute set editor refuses sets of other entity types and deleting the default product set.
  • New frontend_class values must be one of the classes the attribute form offers. "Specific" widget page groups need numeric entity ids. The category image accepts only a bare file name. Array configuration row keys that are not plain identifiers are regenerated.
  • 20.19.x and 21.x only: configuration save checks numeric validation classes and Yes/No values on the server.

If restricted admin roles have held Dataflow Advanced Profiles, Google Sitemap, product, category or CMS editing, or Transactional Emails, or if API users have held customer, cart or catalog attribute permissions, review who held them: these issues let such roles run code, read or delete server files, read encrypted configuration or take over customer accounts. Consider rotating payment and carrier credentials and checking app/etc/local.xml.

Thanks

We thank every researcher who reported these issues through HackerOne. Each advisory names its reporters.

Changes

  • Merges v20.19.2: the security fixes above and the bug fixes merged to main since v20.19.1 (see the v20.19.2 notes).
  • 21.x only: Mage_Core_Model_Layout refuses to create admin blocks in storefront layouts (GHSA-3pv7-jc23-874h).

Full Changelog: v21.0.0-beta4...v21.0.0-beta5