CVE-2021-46875 — ezpublish-kernel
Fix: ezsystems/ezpublish-kernel@29fecd2CVE-2021-46875 is a Cross-site Scripting (XSS) vulnerability in ezsystems/ezpublish-kernel. A fix is available for ezsystems/ezpublish-kernel — see the affected versions and patch details below.
Cross-site scripting in eZ Platform Kernel
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2021-46875.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
ezsystems/ezpublish-kernel🐘ezsystems/ezpublish-kernel🐘ezsystems/ezplatform-kernel🐘ezsystems/ezplatform-kernelReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Impact
In file upload it is possible by certain means to upload files like .html and .js. These may contain XSS exploits which will be run when links to them are accessed by victims.
Patches
The fix consists simply of adding common types of scriptable file types to the configuration of the already existing filetype blacklist feature. See "Patched versions". As such, this can also be done manually, without installing the patched versions. This may be relevant if you are currently running a considerably older version of the kernel package and don't want to upgrade it at this time. Please see the settting "ezsettings.default.io.file_storage.file_type_blacklist" at: https://github.com/ezsystems/ezplatform-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/Resources/config/default_settings.yml#L109
Important note
You should adapt this setting to your needs. Do not add file types to the blacklist that you actually need to be able to upload. For instance, if you need your editors to be able to upload SVG files, then don't blacklist that. Instead, you could e.g. use an approval workflow for such content.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | ezsystems/ezpublish-kernel | all versions | 6.13.8.2composer require ezsystems/ezpublish-kernel:^6.13.8.2 |
| 🐘Packagist | ezsystems/ezpublish-kernel | ≥ 7.0.0&&< 7.5.15.2 | 7.5.15.2composer require ezsystems/ezpublish-kernel:^7.5.15.2 |
| 🐘Packagist | ezsystems/ezplatform-kernel | all versions | 1.2.5.1composer require ezsystems/ezplatform-kernel:^1.2.5.1 |
| 🐘Packagist | ezsystems/ezplatform-kernel | ≥ 1.3.0&&< 1.3.1.1 | 1.3.1.1composer require ezsystems/ezplatform-kernel:^1.3.1.1 |
Affected Products
ez platform kernelibexaDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ezsystems/ezpublish-kernel, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update ezsystems/ezpublish-kernel to 6.13.8.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-46875 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2021-46875 in your dependencies?
Find it across Packagist, including transitive dependencies.