Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. ezsystems/ezpublish-legacy
  4. ›
  5. GHSA-pqjm-xcp8-wgmm

GHSA-pqjm-xcp8-wgmm: Ez Platform and Legacy are prone to an insecure interpretation of PHP/PHAR uploads

May 15, 2024

The eZ Platform and Legacy are affected by an issue related to how uploaded PHP and PHAR files are handled, and consists of two parts: 1. Web server configuration, and 2. Disabling the PHAR stream wrapper.

1. WEB SERVER CONFIGURATION The sample web server configuration in our documentation can in some cases allow the execution of uploaded PHP/PHAR code. This can be abused to allow priviledge escalation and breach of content access controls, among other things. Please ensure that your web server will not execute files in directories were files may be uploaded, such as web/var/ and ezpublish_legacy/var/

As an example, here is how you can make Apache return HTTP 403 Forbidden for a number of executable file types in your eZ Platform var directory. Please adapt it to your needs. It is then possible to enable logging of HTTP 403 in a separate log file if you wish, you could do this to see if someone is trying to abuse the server.

RewriteEngine On

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/ezsystems/ezpublish-legacy/2018-11-21-1.yaml
  • github.com/advisories/GHSA-pqjm-xcp8-wgmm
  • github.com/ezsystems/ezplatform/commit/9a0c52dc4535e4b3ce379f80222dc53f705a2cfd
  • github.com/ezsystems/ezpublish-legacy
  • github.com/ezsystems/ezpublish-legacy/commit/d21957bf202b091ab39dfb5be300f6c30be3933e
  • web.archive.org/web/20210614192208/https://share.ez.no/community-project/security-advisories/ezsa-2018-009-do-not-interpret-php-phar-uploads

Code Behaviors & Features

Detect and mitigate GHSA-pqjm-xcp8-wgmm with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 5.3.0 before 5.3.12.6, all versions starting from 5.4.0 before 5.4.12.3, all versions starting from 2011.0.0 before 2017.12.4.3, all versions starting from 2018.6.0 before 2018.6.1.4, all versions starting from 2018.9.0 before 2018.9.1.3

Fixed versions

  • 2018.9.1.3
  • 2018.6.1.4
  • 2017.12.4.3
  • 5.4.12.3
  • 5.3.12.6

Solution

Upgrade to versions 2017.12.4.3, 2018.6.1.4, 2018.9.1.3, 5.3.12.6, 5.4.12.3 or above.

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

packagist/ezsystems/ezpublish-legacy/GHSA-pqjm-xcp8-wgmm.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:16 +0000.