# GHSA-grh9-37g7-53mj: WireGuard Portal v2 has Open Redirect Vulnerability in OAuth Authentication Flow

> Attackers can redirect users to malicious sites after OAuth login due to insufficient validation of the return parameter 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:** 2 Feb 2026
- **Also known as:** GO-2026-4398

## What is GHSA-grh9-37g7-53mj?

GHSA-grh9-37g7-53mj is a vulnerability in github.com/h44z/wg-portal, published on 2 Feb 2026. 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

### Summary
An Open Redirect vulnerability exists in the OAuth authentication flow that allows attackers to redirect users to external malicious websites after authentication. The vulnerability is caused by insufficient validation of the return parameter in the OAuth login initialization endpoint.

### Patches
The problem was fixed in the latest release, v2.1.2. The [docker images](https://hub.docker.com/r/wgportal/wg-portal) for the tag 'latest' built from the master branch also include the fix.

## Which versions are affected by GHSA-grh9-37g7-53mj?

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 | All versions | 2.1.2 |
| `github.com/h44z/wg-portal` | Go | All versions | 2.1.2 |

## How do I fix GHSA-grh9-37g7-53mj?

Upgrade github.com/h44z/wg-portal to 2.1.2 or later.

## Is GHSA-grh9-37g7-53mj being exploited?

There is no known exploitation of GHSA-grh9-37g7-53mj in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-grh9-37g7-53mj and fix it if it is affected.

What it is: GHSA-grh9-37g7-53mj is a vulnerability in github.com/h44z/wg-portal, published on 2 Feb 2026. 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-grh9-37g7-53mj 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 all versions; fixed in 2.1.2
- github.com/h44z/wg-portal (Go): affected all versions; fixed in 2.1.2

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-grh9-37g7-53mj/ (Markdown: https://insights.sbomify.com/GHSA-grh9-37g7-53mj/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-grh9-37g7-53mj

---
From sbomify Insights: https://insights.sbomify.com/GHSA-grh9-37g7-53mj/
Summaries are generated and may contain mistakes; the official description above is the record.
