# GHSA-39j2-4p9j-5w4j: Ez Platform Object Injection in legacy shop module

> A backend editor with discount rule permissions can perform object injection in the legacy shop module, potentially leading to code execution.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 May 2024

## What is GHSA-39j2-4p9j-5w4j?

GHSA-39j2-4p9j-5w4j is an unsafe deserialization vulnerability in ezsystems/ezpublish-legacy, published on 15 May 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

This Security Advisory is about a vulnerability in the Legacy shop module. A backend editor could perform object injection in discount rules. This would require backend access and permission to edit discount rules. While object injection in itself is a serious vulnerability, the permission requirement means that normally only administrators would be able to exploit it, that's why it was classified as Medium severity.

## Which versions are affected by GHSA-39j2-4p9j-5w4j?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ezsystems/ezpublish-legacy` | Packagist | From 2017.12.0 | 2017.12.7.3 |
| `ezsystems/ezpublish-legacy` | Packagist | From 2017.12.0 | 2017.12.7.3 |
| `ezsystems/ezpublish-legacy` | Packagist | From 2019.3.0 | 2019.3.5.1 |
| `ezsystems/ezpublish-legacy` | Packagist | From 2019.3.0 | 2019.3.5.1 |
| `ezsystems/ezpublish-legacy` | Packagist | From 5.4.0 | 5.4.14.2 |
| `ezsystems/ezpublish-legacy` | Packagist | From 5.4.0 | 5.4.14.2 |

## How do I fix GHSA-39j2-4p9j-5w4j?

Upgrade ezsystems/ezpublish-legacy to a fixed version for your release line: 2017.12.7.3, 2019.3.5.1 or 5.4.14.2.

## Is GHSA-39j2-4p9j-5w4j being exploited?

There is no known exploitation of GHSA-39j2-4p9j-5w4j in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-39j2-4p9j-5w4j and fix it if it is affected.

What it is: GHSA-39j2-4p9j-5w4j is an unsafe deserialization vulnerability in ezsystems/ezpublish-legacy, published on 15 May 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-39j2-4p9j-5w4j in the wild and no public exploit code.

Affected packages and fixed versions:
- ezsystems/ezpublish-legacy (Packagist): affected from 2017.12.0; fixed in 2017.12.7.3
- ezsystems/ezpublish-legacy (Packagist): affected from 2017.12.0; fixed in 2017.12.7.3
- ezsystems/ezpublish-legacy (Packagist): affected from 2019.3.0; fixed in 2019.3.5.1
- ezsystems/ezpublish-legacy (Packagist): affected from 2019.3.0; fixed in 2019.3.5.1
- ezsystems/ezpublish-legacy (Packagist): affected from 5.4.0; fixed in 5.4.14.2
- ezsystems/ezpublish-legacy (Packagist): affected from 5.4.0; fixed in 5.4.14.2

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-39j2-4p9j-5w4j/ (Markdown: https://insights.sbomify.com/GHSA-39j2-4p9j-5w4j/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-39j2-4p9j-5w4j

---
From sbomify Insights: https://insights.sbomify.com/GHSA-39j2-4p9j-5w4j/
Summaries are generated and may contain mistakes; the official description above is the record.
