Skip to content

WireGuard Portal is Vulnerable to Privilege Escalation via User Self-Update to Admin Level

High severity GitHub Reviewed Published Feb 25, 2026 in h44z/wg-portal • Updated Feb 26, 2026

Package

gomod github.com/h44z/wg-portal (Go)

Affected versions

<= 2.1.2

Patched versions

2.1.3

Description

Privilege Escalation to Admin via User Self-Update in wg-portal

Summary

Any authenticated non-admin user can become a full administrator by sending a single PUT request to their own user profile endpoint with "IsAdmin": true in the JSON body. After logging out and back in, the session picks up admin privileges from the database.

Tested against wg-portal v2.1.2 (Docker image wgportal/wg-portal:v2).

Root Cause

When a user updates their own profile, the server parses the full JSON body into the user model, including the IsAdmin boolean field. A function responsible for preserving calculated or protected attributes pins certain fields to their database values (such as base model data, linked peer count, and authentication data), but it does not do this for IsAdmin. As a result, whatever value the client sends for IsAdmin is written directly to the database.

Impact

After the exploit, the attacker has full admin access to the WireGuard VPN management portal. They can:

  • Read and modify every user account
  • Create, modify, and delete WireGuard peers on any interface
  • View WireGuard interface configurations
  • Disable or lock other user accounts
  • Access the full user list and their API tokens

Patches

The problem was fixed in the latest release, v2.1.3. The docker images for the tag 'latest' built from the master branch also include the fix.

References

@h44z h44z published to h44z/wg-portal Feb 25, 2026
Published by the National Vulnerability Database Feb 26, 2026
Published to the GitHub Advisory Database Feb 26, 2026
Reviewed Feb 26, 2026
Last updated Feb 26, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(21st percentile)

Weaknesses

Improper Privilege Management

The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. Learn more on MITRE.

Incorrect Authorization

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. Learn more on MITRE.

CVE ID

CVE-2026-27899

GHSA ID

GHSA-5rmx-256w-8mj9

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.