# GHSA-9cq2-pcgr-8h62: Cross-site Scripting in eZFind spellcheck

> Reflected XSS in eZ Find spellcheck allows attackers to inject scripts if the feature is enabled, requiring user interaction to exploit.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **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-9cq2-pcgr-8h62?

GHSA-9cq2-pcgr-8h62 is a cross-site scripting vulnerability in ezsystems/ezfind-ls, published on 15 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

This security advisory fixes a vulnerability in the legacy eZ Find extension, which can be used with the LegacyBridge in eZ Platform. It affects sites using the "Did you mean...?" spell check / search suggestion feature. This feature is vulnerable to Cross-site Scripting (XSS) injection (reflected XSS). The update adds the necessary escaping of injected code. If you're affected, we recommend that you install it as soon as possible.
 
If you have custom search templates, please make sure you update these as well. Ensure that "search_extras.spellcheck_collation" is followed by the "wash" operator, like this:
{$search_extras.spellcheck_collation|wash}
 
To install, use Composer to update to one of the "Resolving versions" mentioned above, or apply this patch manually:
https://github.com/ezsystems/ezfind/commit/51c17ea9b1231c20db8221f34d01c649060f1e91

## Which versions are affected by GHSA-9cq2-pcgr-8h62?

6 open source packages ship an affected version, including ezsystems/ezfind-ls.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ezsystems/ezfind-ls` | Packagist | From 2017.12.0 | 2017.12.0.1 |
| `ezsystems/ezfind-ls` | Packagist | From 2017.12.0 | 2017.12.0.1 |
| `ezsystems/ezfind-ls` | Packagist | From 5.3.0 | 5.3.6.1 |
| `ezsystems/ezfind-ls` | Packagist | From 5.3.0 | 5.3.6.1 |
| `ezsystems/ezfind-ls` | Packagist | From 5.4.0 | 5.4.11.1 |
| `ezsystems/ezfind-ls` | Packagist | From 5.4.0 | 5.4.11.1 |

## How do I fix GHSA-9cq2-pcgr-8h62?

Upgrade ezsystems/ezfind-ls to a fixed version for your release line: 2017.12.0.1, 5.3.6.1 or 5.4.11.1.

## Is GHSA-9cq2-pcgr-8h62 being exploited?

There is no known exploitation of GHSA-9cq2-pcgr-8h62 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-9cq2-pcgr-8h62 and fix it if it is affected.

What it is: GHSA-9cq2-pcgr-8h62 is a cross-site scripting vulnerability in ezsystems/ezfind-ls, published on 15 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-9cq2-pcgr-8h62 in the wild and no public exploit code.

Affected packages and fixed versions:
- ezsystems/ezfind-ls (Packagist): affected from 2017.12.0; fixed in 2017.12.0.1
- ezsystems/ezfind-ls (Packagist): affected from 2017.12.0; fixed in 2017.12.0.1
- ezsystems/ezfind-ls (Packagist): affected from 5.3.0; fixed in 5.3.6.1
- ezsystems/ezfind-ls (Packagist): affected from 5.3.0; fixed in 5.3.6.1
- ezsystems/ezfind-ls (Packagist): affected from 5.4.0; fixed in 5.4.11.1
- ezsystems/ezfind-ls (Packagist): affected from 5.4.0; fixed in 5.4.11.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-9cq2-pcgr-8h62/ (Markdown: https://insights.sbomify.com/GHSA-9cq2-pcgr-8h62/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-9cq2-pcgr-8h62

---
From sbomify Insights: https://insights.sbomify.com/GHSA-9cq2-pcgr-8h62/
Summaries are generated and may contain mistakes; the official description above is the record.
