# GHSA-2r2v-9pf8-6342: WireGuard Portal v2 Vulnerable to OAuth Insecure Redirect URI / Account Takeover in github.com/h44z/wg-portal

> An attacker can exploit an insecure OAuth redirect URI to hijack user accounts in WireGuard Portal v2.

- **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:** 7 Jan 2025
- **Also known as:** GO-2025-3371

## What is GHSA-2r2v-9pf8-6342?

GHSA-2r2v-9pf8-6342 is a vulnerability in github.com/h44z/wg-portal, published on 7 Jan 2025. 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

WireGuard Portal v2 Vulnerable to OAuth Insecure Redirect URI / Account Takeover in github.com/h44z/wg-portal.

NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.

(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)

The additional affected modules and versions are: github.com/h44z/wg-portal from v2.0.0-alpha.1 before v2.0.0-alpha.3.

## Which versions are affected by GHSA-2r2v-9pf8-6342?

3 open source packages ship an affected version, including github.com/h44z/wg-portal.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/h44z/wg-portal` | Go | All versions | None |
| `github.com/h44z/wg-portal` | Go | From 2.0.0-alpha.1 | 2.0.0-alpha.3 |
| `github.com/h44z/wg-portal` | Go | From 2.0.0-alpha.1 | 2.0.0-alpha.3 |

## How do I fix GHSA-2r2v-9pf8-6342?

Upgrade github.com/h44z/wg-portal to 2.0.0-alpha.3 or later.

## Is GHSA-2r2v-9pf8-6342 being exploited?

There is no known exploitation of GHSA-2r2v-9pf8-6342 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-2r2v-9pf8-6342 and fix it if it is affected.

What it is: GHSA-2r2v-9pf8-6342 is a vulnerability in github.com/h44z/wg-portal, published on 7 Jan 2025. 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-2r2v-9pf8-6342 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/h44z/wg-portal (Go): affected all versions; no fix listed
- github.com/h44z/wg-portal (Go): affected from 2.0.0-alpha.1; fixed in 2.0.0-alpha.3
- github.com/h44z/wg-portal (Go): affected from 2.0.0-alpha.1; fixed in 2.0.0-alpha.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-2r2v-9pf8-6342/ (Markdown: https://insights.sbomify.com/GHSA-2r2v-9pf8-6342/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-2r2v-9pf8-6342

---
From sbomify Insights: https://insights.sbomify.com/GHSA-2r2v-9pf8-6342/
Summaries are generated and may contain mistakes; the official description above is the record.
