# GHSA-jpwx-ffjq-wr4w: Content object state fetch functions open to SQL injection

> SQL injection in eZ Publish Legacy content object state functions allows attackers to read or modify database data.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not stated
- **Attackable:** Over the internet
- **Victim action needed:** Not stated
- **Fix available:** Yes
- **Published:** 7 Sep 2021

## What is GHSA-jpwx-ffjq-wr4w?

GHSA-jpwx-ffjq-wr4w is a SQL injection vulnerability in ezsystems/ezpublish-legacy, published on 7 Sep 2021. It can be exploited over the network.

### Official description

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

## Which versions are affected by GHSA-jpwx-ffjq-wr4w?

4 open source packages ship an affected version, including ezsystems/ezpublish-legacy.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ezsystems/ezpublish-legacy` | Packagist | All versions | 2017.12.7.4 |
| `ezsystems/ezpublish-legacy` | Packagist | All versions | 2017.12.7.4 |
| `ezsystems/ezpublish-legacy` | Packagist | From 2018.06.0 | 2019.03.6.1 |
| `ezsystems/ezpublish-legacy` | Packagist | From 2018.06.0 | 2019.03.6.1 |

## How do I fix GHSA-jpwx-ffjq-wr4w?

Upgrade ezsystems/ezpublish-legacy to a fixed version for your release line: 2017.12.7.4 or 2019.03.6.1.

## Is GHSA-jpwx-ffjq-wr4w being exploited?

There is no known exploitation of GHSA-jpwx-ffjq-wr4w in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-jpwx-ffjq-wr4w and fix it if it is affected.

What it is: GHSA-jpwx-ffjq-wr4w is a SQL injection vulnerability in ezsystems/ezpublish-legacy, published on 7 Sep 2021. It can be exploited over the network.
Exploitation: There is no known exploitation of GHSA-jpwx-ffjq-wr4w in the wild and no public exploit code.

Affected packages and fixed versions:
- ezsystems/ezpublish-legacy (Packagist): affected all versions; fixed in 2017.12.7.4
- ezsystems/ezpublish-legacy (Packagist): affected all versions; fixed in 2017.12.7.4
- ezsystems/ezpublish-legacy (Packagist): affected from 2018.06.0; fixed in 2019.03.6.1
- ezsystems/ezpublish-legacy (Packagist): affected from 2018.06.0; fixed in 2019.03.6.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-jpwx-ffjq-wr4w/ (Markdown: https://insights.sbomify.com/GHSA-jpwx-ffjq-wr4w/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-jpwx-ffjq-wr4w

---
From sbomify Insights: https://insights.sbomify.com/GHSA-jpwx-ffjq-wr4w/
Summaries are generated and may contain mistakes; the official description above is the record.
