GHSA-jpwx-ffjq-wr4w: Ezsystems/ezpublish legacy SQL Injection Vulnerability

HIGH
CWE-89
Published
Advisory Summary

GHSA-jpwx-ffjq-wr4w is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Ezsystems/ezpublish legacy libraries in the Packagist ecosystem. The issue involves content object state fetch functions open to sql injection. Remediation is available by upgrading affected packages to version 2019.03.6.1, 2017.12.7.4.

GHSA-jpwx-ffjq-wr4w at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jpwx-ffjq-wr4w
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Ezsystems/ezpublish legacy
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-jpwx-ffjq-wr4w

To remediate this vulnerability, upgrade all affected Ezsystems/ezpublish legacy 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-legacy fixed: 2019.03.6.1
Upgrade ezsystems/ezpublish-legacy to 2019.03.6.1
ezsystems/ezpublish-legacy fixed: 2017.12.7.4
Upgrade ezsystems/ezpublish-legacy to 2017.12.7.4
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-legacy

How to Check if You Are Affected

To determine whether your application is affected by GHSA-jpwx-ffjq-wr4w, inspect your project dependencies for Ezsystems/ezpublish legacy:

inspect dependencies for ezsystems/ezpublish-legacy

Analyze the terminal output to locate any version of Ezsystems/ezpublish legacy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2019.03.6.1), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Ezsystems/ezpublish legacy, 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 This Security Update is about a vulnerability in eZ Publish Legacy. The content object state code could be vulnerable to SQL injection. There is no known exploit, but one might be possible. If you use Legacy in any way, we strongly recommend that you install this update as soon as possible. ### Patches The fix is distributed via Composer, see "Patched versions".

GHSA-jpwx-ffjq-wr4w Affected Ezsystems/ezpublish legacy Versions

2 component(s)
Fixed Versions:
2019.03.6.12017.12.7.4
Product / Package Ecosystem Affected Versions Fixed Version
ezsystems/ezpublish-legacy
Packagist
≥ 2018.06.0
< 2019.03.6.1
2019.03.6.1
ezsystems/ezpublish-legacy
Packagist
< 2017.12.7.4
2017.12.7.4

References

Frequently Asked Questions

What is GHSA-jpwx-ffjq-wr4w?
GHSA-jpwx-ffjq-wr4w is a security vulnerability in Ezsystems/ezpublish legacy involving Content object state fetch functions open to SQL injection under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Ezsystems/ezpublish legacy versions are affected?
Affected versions include releases prior to 2019.03.6.1, 2017.12.7.4 across affected packages: ezsystems/ezpublish-legacy.
What version fixes GHSA-jpwx-ffjq-wr4w?
Upgrading to 2019.03.6.1, 2017.12.7.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ezsystems/ezpublish-legacy affected?
Yes, ezsystems/ezpublish-legacy is affected in releases prior to 2019.03.6.1, 2017.12.7.4. Upgrade your dependency to 2019.03.6.1, 2017.12.7.4 or later.
What CWE is associated with GHSA-jpwx-ffjq-wr4w?
GHSA-jpwx-ffjq-wr4w is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for GHSA-jpwx-ffjq-wr4w?
Run the dependency tree command: 'inspect dependencies for ezsystems/ezpublish-legacy'. 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-jpwx-ffjq-wr4w",
  "modified" : "2021-09-03T20:10:38Z",
  "published" : "2021-09-07T22:54:23Z",
  "aliases" : [ ],
  "summary" : "Content object state fetch functions open to SQL injection",
  "details" : "### Impact\nThis Security Update is about a vulnerability in eZ Publish Legacy. The content object state code could be vulnerable to SQL injection. There is no known exploit, but one might be possible. If you use Legacy in any way, we strongly recommend that you install this update as soon as possible.\n\n### Patches\nThe fix is distributed via Composer, see \"Patched versions\".\n\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ezsystems/ezpublish-legacy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2018.06.0"
      }, {
        "fixed" : "2019.03.6.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2019.03.5.1"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "ezsystems/ezpublish-legacy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2017.12.7.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2017.12.7.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ezsystems/ezpublish-legacy/security/advisories/GHSA-jpwx-ffjq-wr4w"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ezsystems/ezpublish-legacy/commit/f8e3a97afd92efb9148134a4bacb35a875777a42"
  }, {
    "type" : "WEB",
    "url" : "https://developers.ibexa.co/security-advisories/ibexa-sa-2021-005-content-object-state-fetch-functions-open-to-sql-injection"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ezsystems/ezpublish-legacy"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-09-03T20:10:38Z",
    "nvd_published_at" : null
  }
}