# GHSA-gm68-572p-q28r: @vendure/admin-ui-plugin authenticated Cross-site Scripting vulnerability

> Authenticated users can inject arbitrary HTML into description fields, leading to XSS and privilege escalation when other users view the page.

- **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:** 6 Jul 2023

## What is GHSA-gm68-572p-q28r?

GHSA-gm68-572p-q28r is a cross-site scripting vulnerability in @vendure/admin-ui-plugin, published on 6 Jul 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

### Impact
Vendure provides an authorization system with different levels of privileges. For example, an administrator cannot create another administrator.

In the admin UI, there are a couple of places with description inputs, such as inventory/collection catalog, shipping methods, promotions, and more.

While the WYSIWYG editor allows limited customization, altering the request data (not in the ui) saves and returns arbitrary HTML with no sanitization. Causing an XSS when viewing the page.

The impact of this XSS is privilege escalation. A user that can write any type of description can trigger the attack. Then any other user that visits the vulnerable page is prone to arbitrary Javascript code execution, giving the attacker ability to execute actions on behalf of this user.

### Patches
in progress

### Workarounds
_Is there a way for users to fix or remediate the vulnerability without upgrading?_

### References
_Are there any links users can visit to find out more?_

## Which versions are affected by GHSA-gm68-572p-q28r?

2 open source packages ship an affected version, including @vendure/admin-ui-plugin.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@vendure/admin-ui-plugin` | npm | All versions | 2.0.3 |
| `@vendure/admin-ui-plugin` | npm | All versions | 2.0.3 |

## How do I fix GHSA-gm68-572p-q28r?

Upgrade @vendure/admin-ui-plugin to 2.0.3 or later.

## Is GHSA-gm68-572p-q28r being exploited?

There is no known exploitation of GHSA-gm68-572p-q28r in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-gm68-572p-q28r and fix it if it is affected.

What it is: GHSA-gm68-572p-q28r is a cross-site scripting vulnerability in @vendure/admin-ui-plugin, published on 6 Jul 2023. 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-gm68-572p-q28r in the wild and no public exploit code.

Affected packages and fixed versions:
- @vendure/admin-ui-plugin (npm): affected all versions; fixed in 2.0.3
- @vendure/admin-ui-plugin (npm): affected all versions; fixed in 2.0.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-gm68-572p-q28r/ (Markdown: https://insights.sbomify.com/GHSA-gm68-572p-q28r/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-gm68-572p-q28r

---
From sbomify Insights: https://insights.sbomify.com/GHSA-gm68-572p-q28r/
Summaries are generated and may contain mistakes; the official description above is the record.
