# GHSA-mgr9-6c2j-jxrq: Pterodactyl has a Reflected XSS vulnerability in “Create New Database Host”

> Administrators can trigger reflected XSS by pasting malicious scripts into the database host field, requiring self-interaction to exploit.

- **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:** 30 Dec 2025

## What is GHSA-mgr9-6c2j-jxrq?

GHSA-mgr9-6c2j-jxrq is a cross-site scripting vulnerability in pterodactyl/panel, published on 30 Dec 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

> [!NOTE]
> Message from the Pterodactyl team:
>
> The Pterodactyl team has evaluated this as a minor security issue but does not consider it something that should be assigned a CVE, nor does it require active patching by vulnerable systems.
>
> This issue is entirely self-inflicted and requires an administrative user paste an _obviously_ incorrect value into a database host field, submit it, and run into the XSS when the error message is rendered. However, we have determined that this fix is good security hygiene and may prevent issues in other areas not yet discovered.

### Summary
When an administrative user creates a new database host they are prompted to provide a `Host` value which is expected to be a domain or IP address. When an invalid value is encountered and passed back to `gethostaddr` and/or directly to the MySQL connection tooling, an error is returned. This error is then passed back along to the front-end, but was not properly sanitized when rendered.

Therefore it is possible for an admin to _knowingly_ paste a malicious payload such as `<script>prompt(document.domain)</script>` into the `Host` field and XSS themselves.

## Which versions are affected by GHSA-mgr9-6c2j-jxrq?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pterodactyl/panel` | Packagist | All versions | 1.12.0 |
| `pterodactyl/panel` | Packagist | All versions | 1.12.0 |

## How do I fix GHSA-mgr9-6c2j-jxrq?

Upgrade pterodactyl/panel to 1.12.0 or later.

## Is GHSA-mgr9-6c2j-jxrq being exploited?

There is no known exploitation of GHSA-mgr9-6c2j-jxrq in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-mgr9-6c2j-jxrq and fix it if it is affected.

What it is: GHSA-mgr9-6c2j-jxrq is a cross-site scripting vulnerability in pterodactyl/panel, published on 30 Dec 2025. 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-mgr9-6c2j-jxrq in the wild and no public exploit code.

Affected packages and fixed versions:
- pterodactyl/panel (Packagist): affected all versions; fixed in 1.12.0
- pterodactyl/panel (Packagist): affected all versions; fixed in 1.12.0

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-mgr9-6c2j-jxrq/ (Markdown: https://insights.sbomify.com/GHSA-mgr9-6c2j-jxrq/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-mgr9-6c2j-jxrq

---
From sbomify Insights: https://insights.sbomify.com/GHSA-mgr9-6c2j-jxrq/
Summaries are generated and may contain mistakes; the official description above is the record.
