GHSA-pqjm-xcp8-wgmm: Ez Platform and Legacy are prone to an insecure interpretation of PHP/PHAR uploads
Noroxi assessment
Priority: Monitor (action score 0/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Fixed version: ezsystems/ezpublish-legacy (Packagist) 2017.12.4.3, 2018.6.1.4, 2018.9.1.3.
Low priority for now. Upgrade to ezsystems/ezpublish-legacy (Packagist) 2017.12.4.3, 2018.6.1.4, 2018.9.1.3 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: OSV
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 # disable .php(3) and other extensions in the var directory RewriteRule ^var/.*(?i)\.(php3?|phar|phtml|sh|exe|pl|bin)$ - [F] ``` Here is the same configuration, but for the Nginx web server: ``` location ~ ^/var/.*(?i)\.(php3?|phar|phtml|sh|exe|pl|bin)$ { return 403; } ``` **2. DISABLE PHAR STREAM WRAPPER** PHAR archives may be crafted such that its stream wrapper will execute them without being specifically asked to. With such files, any PHP file operation may cause deserialisation and execution. This may happen even if the file name suffix isn't ".phar". Any site that allows file uploads is at risk. Normally eZ Platform has no need for PHAR support. It's only used by Composer, and that is executed separately from eZ Platform. So one way to avoid this vulnerability is to disable the PHAR stream wrapper within eZ Platform. (If you know you need PHAR support, please consider other means to deal with this vulnerability. For example, enabling the wrapper only in those scripts/bundles that have to deal with such files.) Disabling the stream wrapper should be done in: eZ Platform (web/app.php) CLI scripts (bin/console) Legacy (index.php and CLI scripts) To install, use Composer to update to one of the "Resolving versions" mentioned above, or apply these patches manually: https://github.com/ezsystems/ezplatform/commit/9a0c52dc4535e4b3ce379f80222dc53f705a2cfd https://github.com/ezsystems/ezpublish-legacy/commit/d21957bf202b091ab39dfb5be300f6c30be3933e
- Published
- May 15, 2024
- Updated
- Nov 29, 2024
- EPSS
- —
- CWE
- CWE-94
Report tools
Action score
0
Low priority for now.
- CVSS
- 0 / 40 · —
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · —
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| Packagist | ezsystems/ezpublish-legacy | pkg:composer/ezsystems/ezpublish-legacy |
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Packagist | ezsystems/ezpublish-legacy | from 2011.0.0 · before 2017.12.4.3 | 2017.12.4.3 |
| Packagist | ezsystems/ezpublish-legacy | from 2018.6.0 · before 2018.6.1.4 | 2018.6.1.4 |
| Packagist | ezsystems/ezpublish-legacy | from 2018.9.0 · before 2018.9.1.3 | 2018.9.1.3 |
| Packagist | ezsystems/ezpublish-legacy | from 5.3.0 · before 5.3.12.6 | 5.3.12.6 |
| Packagist | ezsystems/ezpublish-legacy | from 5.4.0 · before 5.4.12.3 | 5.4.12.3 |
Same product
Packagist: all recordsOther highest-scoring records for the same primary product.
- GHSA-39j2-4p9j-5w4jEz Platform Object Injection in legacy shop module0Monitor
- GHSA-9895-26wr-4fgvEZsystems Remote code execution in file uploads0Monitor
- GHSA-p9mp-vq4v-v5m5eZ Publish Legacy Passwordless login for LDAP users0Monitor
Published before and after this one in the same product
- ← EarlierGHSA-cc2j-92jq-wgjgMay 15, 2024 · eZ Publish Information disclosure in backend content tree menu0Monitor
- ← EarlierGHSA-82rv-45pc-v28wMay 15, 2024 · eZ Publish Legacy Patch EZSA-2018-001 for Several vulnerabilities0Monitor
- ← EarlierGHSA-2vh3-cj9j-mcj5May 15, 2024 · eZ Publish Legacy Cross-site Scripting (XSS) in 'disabled module' error template0Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Packagist:ezsystems/ezpublish-legacy | 2017.12.4.3 | Package registry (OSV) |
| Packagist:ezsystems/ezpublish-legacy | 2018.6.1.4 | Package registry (OSV) |
| Packagist:ezsystems/ezpublish-legacy | 2018.9.1.3 | Package registry (OSV) |
| Packagist:ezsystems/ezpublish-legacy | 5.3.12.6 | Package registry (OSV) |
| Packagist:ezsystems/ezpublish-legacy | 5.4.12.3 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- GHSA-39j2-4p9j-5w4j0 days apartEz Platform Object Injection in legacy shop module0Monitor
- GHSA-9895-26wr-4fgv0 days apartEZsystems Remote code execution in file uploads0Monitor
Not on record for this CVE: EPSS history · researcher credit · public bounty program.
Technical details
No CVSS vector for this record, so attack conditions can't be derived.
Weakness class (CWE)
CWE-94 · Improper Control of Generation of Code ('Code Injection')Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
Change log (2)
- Fix✗ → ✓
- CVSS5.5 → —
For records you follow, these changes also arrive as notifications. →
References
Show all references (5 more)Show less
- github.com/ezsystems/ezpublish-legacy/commit/d21957bf202b091ab39dfb5be300f6c30be3933e
- github.com/FriendsOfPHP/security-advisories/blob/master/ezsystems/ezpublish-legacy/2018-11-21-1.yaml
- github.com/ezsystems/ezpublish-legacy
- web.archive.org/web/20210614192208/https://share.ez.no/community-project/security-advisories/ezsa-2018-009-do-not-interpret-php-phar-uploads
- share.ez.no/community-project/security-advisories/ezsa-2018-009-do-not-interpret-php-phar-uploads
Vendor advisories and official records. Exploit/PoC links are deliberately left out.