# GHSA-5822-pw57-vv37: XSS vulnerability when listing users on add & modify server pages.

> An XSS vulnerability in Pterodactyl Panel allows attackers to inject scripts via account names in admin server pages, potentially compromising admin accounts.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 Oct 2020

## What is GHSA-5822-pw57-vv37?

GHSA-5822-pw57-vv37 is a cross-site scripting vulnerability in pterodactyl/panel, published on 8 Oct 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

### Impact
An XSS vulnerability exists in versions of Pterodactyl Panel before 0.7.19. Affected versions do not properly sanitize account names before rendering them to the dropdown selector in the admin area when creating or modifying a server.

### Patches
This XSS has been addressed in 0.7.19 and will be rolled forwards into the 1.0-rc.7 release.

### Workarounds
No workaround exists without manual patching. See https://github.com/pterodactyl/panel/pull/2441/files for the files changed.

### For more information
If you have any questions or comments about this advisory please reach out on Discord, or by emailing `dane` at `pterodactyl` dot `io`.

_Thank you to Sergej for the responsible disclosure of this issue._

## Which versions are affected by GHSA-5822-pw57-vv37?

4 open source packages ship an affected version, including pterodactyl/panel.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pterodactyl/panel` | Packagist | All versions | 0.7.19 |
| `pterodactyl/panel` | Packagist | All versions | 0.7.19 |
| `pterodactyl/panel` | Packagist | From 1.0.0-rc.0 | 1.0.0-rc.7 |
| `pterodactyl/panel` | Packagist | From 1.0.0-rc.0 | 1.0.0-rc.7 |

## How do I fix GHSA-5822-pw57-vv37?

Upgrade pterodactyl/panel to a fixed version for your release line: 0.7.19 or 1.0.0-rc.7.

## Is GHSA-5822-pw57-vv37 being exploited?

There is no known exploitation of GHSA-5822-pw57-vv37 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-5822-pw57-vv37 and fix it if it is affected.

What it is: GHSA-5822-pw57-vv37 is a cross-site scripting vulnerability in pterodactyl/panel, published on 8 Oct 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-5822-pw57-vv37 in the wild and no public exploit code.

Affected packages and fixed versions:
- pterodactyl/panel (Packagist): affected all versions; fixed in 0.7.19
- pterodactyl/panel (Packagist): affected all versions; fixed in 0.7.19
- pterodactyl/panel (Packagist): affected from 1.0.0-rc.0; fixed in 1.0.0-rc.7
- pterodactyl/panel (Packagist): affected from 1.0.0-rc.0; fixed in 1.0.0-rc.7

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-5822-pw57-vv37/ (Markdown: https://insights.sbomify.com/GHSA-5822-pw57-vv37/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-5822-pw57-vv37

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