# GHSA-6rg3-8h8x-5xfv: Unchecked hostname resolution could allow access to local network resources by users outside the local network

> Authenticated users can exploit unchecked hostname resolution to access local network resources via remote file downloads.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jun 2021
- **Also known as:** GO-2022-0389

## What is GHSA-6rg3-8h8x-5xfv?

GHSA-6rg3-8h8x-5xfv is a server-side request forgery vulnerability in github.com/pterodactyl/wings, published on 23 Jun 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact
A newly implemented route allowing users to download files from remote endpoints was not properly verifying the destination hostname for user provided URLs. This would allow malicious users to potentially access resources on local networks that would otherwise be inaccessible.

This vulnerability requires valid authentication credentials and is therefore **not exploitable by unauthenticated users**. If you are running an instance for yourself or other trusted individuals this impact is unlikely to be of major concern to you. However, you should still upgrade for security sake.

### Patches
Users should upgrade to the latest version of Wings.

### Workarounds
There is no workaround available that does not involve modifying Panel or Wings code.

## Which versions are affected by GHSA-6rg3-8h8x-5xfv?

3 open source packages ship an affected version, including github.com/pterodactyl/wings.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/pterodactyl/wings` | Go | From 1.2.0 | 1.2.1 |
| `github.com/pterodactyl/wings` | Go | From 1.2.0 | 1.2.1 |
| `github.com/pterodactyl/wings` | Go | From 1.2.0 | 1.2.1 |

## How do I fix GHSA-6rg3-8h8x-5xfv?

Upgrade github.com/pterodactyl/wings to 1.2.1 or later.

## Is GHSA-6rg3-8h8x-5xfv being exploited?

There is no known exploitation of GHSA-6rg3-8h8x-5xfv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-6rg3-8h8x-5xfv and fix it if it is affected.

What it is: GHSA-6rg3-8h8x-5xfv is a server-side request forgery vulnerability in github.com/pterodactyl/wings, published on 23 Jun 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-6rg3-8h8x-5xfv in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/pterodactyl/wings (Go): affected from 1.2.0; fixed in 1.2.1
- github.com/pterodactyl/wings (Go): affected from 1.2.0; fixed in 1.2.1
- github.com/pterodactyl/wings (Go): affected from 1.2.0; fixed in 1.2.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-6rg3-8h8x-5xfv/ (Markdown: https://insights.sbomify.com/GHSA-6rg3-8h8x-5xfv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-6rg3-8h8x-5xfv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-6rg3-8h8x-5xfv/
Summaries are generated and may contain mistakes; the official description above is the record.
