# GHSA-82rv-45pc-v28w: eZ Publish Legacy Patch EZSA-2018-001 for Several vulnerabilities

> Attackers can hijack accounts, leak restricted data, or execute scripts via XSS in eZ Publish Legacy, requiring immediate updates.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 May 2024

## What is GHSA-82rv-45pc-v28w?

GHSA-82rv-45pc-v28w is a cross-site scripting vulnerability in ezsystems/ezpublish-legacy, published on 15 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

This security advisory fixes 4 separate vulnerabilities in eZ Publish Legacy, and we recommend that you install it as soon as possible if you are using Legacy by itself or via the LegacyBridge.
 
First, it increases the randomness, and thus the security, of the pseudo-random bytes used to generate a hash for the "forgot password" feature. This protects accounts against being taken over through attacks trying to predict the hash. If the increased randomness is not available in your PHP installation, it will now log a warning.
 
Second, it improves security of the information collector feature, by ensuring no collection emails will be sent from invalid manipulated forms.
 
Third, it stops the possible leaking of the names of content objects that should not be readable for certain users, on installations where these users can create or edit XML text.
 
Fourth, it protects against cross-site scripting (XSS) in the Matrix data type, on installations where users are allowed to edit content classes / content types.

We recommend that you install the security update as soon as possible.

To install, use Composer to update to one of the "Resolving versions" mentioned above, or apply these patches manually:
https://github.com/ezsystems/ezpublish-legacy/commit/917711eb7ffe2b52a3e9fe12505f6810a63696f7
https://github.com/ezsystems/ezpublish-legacy/commit/6db0e6b7739481f27d954548388bd3f0ed2c6fdd
https://github.com/ezsystems/ezpublish-legacy/commit/efcd2b61b15eaaf74e0ff28d6c723cf28e655dab
https://github.com/ezsystems/ezpublish-legacy/commit/f9ffaf590b63b4f552142cfd4441afbbfb3f19b1

## Which versions are affected by GHSA-82rv-45pc-v28w?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ezsystems/ezpublish-legacy` | Packagist | From 2011.0.0 | 2017.12.2.1 |
| `ezsystems/ezpublish-legacy` | Packagist | From 2011.0.0 | 2017.12.2.1 |
| `ezsystems/ezpublish-legacy` | Packagist | From 5.3.0 | 5.3.12.3 |
| `ezsystems/ezpublish-legacy` | Packagist | From 5.3.0 | 5.3.12.3 |
| `ezsystems/ezpublish-legacy` | Packagist | From 5.4.0 | 5.4.11.3 |
| `ezsystems/ezpublish-legacy` | Packagist | From 5.4.0 | 5.4.11.3 |

## How do I fix GHSA-82rv-45pc-v28w?

Upgrade ezsystems/ezpublish-legacy to a fixed version for your release line: 2017.12.2.1, 5.3.12.3 or 5.4.11.3.

## Is GHSA-82rv-45pc-v28w being exploited?

There is no known exploitation of GHSA-82rv-45pc-v28w in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-82rv-45pc-v28w and fix it if it is affected.

What it is: GHSA-82rv-45pc-v28w is a cross-site scripting vulnerability in ezsystems/ezpublish-legacy, published on 15 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-82rv-45pc-v28w in the wild and no public exploit code.

Affected packages and fixed versions:
- ezsystems/ezpublish-legacy (Packagist): affected from 2011.0.0; fixed in 2017.12.2.1
- ezsystems/ezpublish-legacy (Packagist): affected from 2011.0.0; fixed in 2017.12.2.1
- ezsystems/ezpublish-legacy (Packagist): affected from 5.3.0; fixed in 5.3.12.3
- ezsystems/ezpublish-legacy (Packagist): affected from 5.3.0; fixed in 5.3.12.3
- ezsystems/ezpublish-legacy (Packagist): affected from 5.4.0; fixed in 5.4.11.3
- ezsystems/ezpublish-legacy (Packagist): affected from 5.4.0; fixed in 5.4.11.3

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-82rv-45pc-v28w/ (Markdown: https://insights.sbomify.com/GHSA-82rv-45pc-v28w/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-82rv-45pc-v28w

---
From sbomify Insights: https://insights.sbomify.com/GHSA-82rv-45pc-v28w/
Summaries are generated and may contain mistakes; the official description above is the record.
