CVE-2021-46875: Ezsystems/ezpublish kernel Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-mrvj-7q4f-5p42
CWE-79
Published
Advisory Summary

CVE-2021-46875 is a HIGH cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Ezsystems/ezpublish kernel libraries in the Packagist ecosystem. The issue involves cross-site scripting in ez platform kernel. Remediation is available by upgrading affected packages to version 6.13.8.2, 7.5.15.2, 1.2.5.1, 1.3.1.1.

CVE-2021-46875 at a Glance

CVE Identifier CVE-2021-46875
GHSA Identifier GHSA-mrvj-7q4f-5p42
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Ezsystems/ezpublish kernel
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2021-46875

To remediate this vulnerability, upgrade all affected Ezsystems/ezpublish kernel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ezsystems/ezpublish-kernel fixed: 6.13.8.2
Upgrade ezsystems/ezpublish-kernel to 6.13.8.2
ezsystems/ezpublish-kernel fixed: 7.5.15.2
Upgrade ezsystems/ezpublish-kernel to 7.5.15.2
ezsystems/ezplatform-kernel fixed: 1.2.5.1
Upgrade ezsystems/ezplatform-kernel to 1.2.5.1
ezsystems/ezplatform-kernel fixed: 1.3.1.1
Upgrade ezsystems/ezplatform-kernel to 1.3.1.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ezsystems/ezpublish-kernel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-46875, inspect your project dependencies for Ezsystems/ezpublish kernel:

inspect dependencies for ezsystems/ezpublish-kernel

Analyze the terminal output to locate any version of Ezsystems/ezpublish kernel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.13.8.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Ezsystems/ezpublish kernel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2021-46875 Affected Ezsystems/ezpublish kernel Versions

4 component(s)
Fixed Versions:
6.13.8.27.5.15.21.2.5.11.3.1.1
Product / Package Ecosystem Affected Versions Fixed Version
ezsystems/ezpublish-kernel
Packagist
< 6.13.8.2
6.13.8.2
ezsystems/ezpublish-kernel
Packagist
≥ 7.0.0
< 7.5.15.2
7.5.15.2
ezsystems/ezplatform-kernel
Packagist
< 1.2.5.1
1.2.5.1
ezsystems/ezplatform-kernel
Packagist
≥ 1.3.0
< 1.3.1.1
1.3.1.1

References

Frequently Asked Questions

What is CVE-2021-46875?
CVE-2021-46875 is a security vulnerability in Ezsystems/ezpublish kernel involving Cross-site scripting in eZ Platform Kernel under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Ezsystems/ezpublish kernel versions are affected?
Affected versions include releases prior to 6.13.8.2, 7.5.15.2, 1.2.5.1, 1.3.1.1 across affected packages: ezsystems/ezpublish-kernel, ezsystems/ezplatform-kernel.
What version fixes CVE-2021-46875?
Upgrading to 6.13.8.2, 7.5.15.2, 1.2.5.1, 1.3.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ezsystems/ezpublish-kernel affected?
Yes, ezsystems/ezpublish-kernel is affected in releases prior to 6.13.8.2, 7.5.15.2. Upgrade your dependency to 6.13.8.2, 7.5.15.2 or later.
Is ezsystems/ezplatform-kernel affected?
Yes, ezsystems/ezplatform-kernel is affected in releases prior to 1.2.5.1, 1.3.1.1. Upgrade your dependency to 1.2.5.1, 1.3.1.1 or later.
What CWE is associated with CVE-2021-46875?
CVE-2021-46875 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2021-46875?
Run the dependency tree command: 'inspect dependencies for ezsystems/ezpublish-kernel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mrvj-7q4f-5p42",
  "modified" : "2026-02-02T19:55:39Z",
  "published" : "2021-03-19T19:56:42Z",
  "aliases" : [ "CVE-2021-46875" ],
  "summary" : "Cross-site scripting in eZ Platform Kernel",
  "details" : "### Impact\nIn 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.\n\n### Patches\nThe 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:\nhttps://github.com/ezsystems/ezplatform-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/Resources/config/default_settings.yml#L109\n\n### Important note\nYou 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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ezsystems/ezpublish-kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.13.8.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.13.8.1"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ezsystems/ezpublish-kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.5.15.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.5.15.1"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ezsystems/ezplatform-kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.5.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.2.5"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ezsystems/ezplatform-kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.1.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.3.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ezsystems/ezpublish-kernel/security/advisories/GHSA-mrvj-7q4f-5p42"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-46875"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ezsystems/ezpublish-kernel/commit/29fecd2afe86f763510f10c02f14962d028f311b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ezsystems/ezpublish-kernel"
  }, {
    "type" : "WEB",
    "url" : "https://packagist.org/packages/ezsystems/ezplatform-kernel#v1.2.5.1"
  }, {
    "type" : "WEB",
    "url" : "https://packagist.org/packages/ezsystems/ezpublish-kernel#v7.5.15.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-19T19:56:16Z",
    "nvd_published_at" : null
  }
}