Loading...
Skip to main content

CVE-2026-47722 — Vulnerability in github.com/juev/nebula-mesh —...

HIGH

nebula-mesh: Host advanced overrides allow YAML injection into agent config.yml

Published June 8, 2026Updated June 25, 2026Source: osv

Summary

`internal/configgen/generator.go:86,108,119` interpolates the operator-supplied `ListenHost` and `TunDevice` fields raw into a `text/template` that produces the agent's `config.yml`. `internal/web/advanced.go:20-35` accepts both with only `strings.TrimSpace` — no character or shape validation. ## Exploit An operator (or attacker with any operator key, given the cross-tenant CRUD advisory) sets `adv_tun_device` to: ``` nebula0 lighthouse: am_lighthouse: true hosts: ["10.0.0.1"] # ``` The agent fetches the rendered config on its next signed poll. On config reload, it loads the injected YAML keys: the host self-promotes to lighthouse, attracts mesh traffic, or sets `am_relay: true` to be selected as a relay. The `ListenHost` field has the same shape. ## Affected All released versions prior to v0.3.2. ## Threat model - **Today**: operator can compromise their own host's config (trivially allowed if they own the host, but they can also set lighthouse/relay flags that the operator-create form does NOT expose — privilege uplift within their own tenant). - **Combined with the critical /api/v1 authz advisory**: any operator key can mutate ANOTHER tenant's host overrides and inject YAML there. - **Post-fix of the authz advisory**: still relevant — the agent unconditionally trusts whatever config the server hands it, so any future operator-impersonation bug re-amplifies this. ## Suggested fix Two options, either acceptable: 1. **Input validation** in `parseAdvancedFromForm` (`internal/web/advanced.go`): - `ListenHost`: regex `^[A-Za-z0-9.:\[\]_-]+$` (IPv4/IPv6/hostname) - `TunDevice`: regex `^[A-Za-z0-9_-]{1,15}$` (Linux IFNAMSIZ caps at 15) Reject invalid input with a form-level error; do not write to the host row. 2. **Safer marshalling**: switch `configgen/generator.go` to marshal a typed Go struct via `gopkg.in/yaml.v3` (which escapes correctly) instead of `text/template` string-concat. Larger change, but eliminates this entire injection class. Option 2 is preferable long-term. Option 1 is the quick fix. The `unsafe_routes` advanced field is already `netip.Parse{Prefix,Addr}`-validated at `enroll.go:226-233` — apply the same validation discipline to the other advanced fields.

Advisory Timeline

  • First published June 8, 2026 (125 days ago).
  • Last revised June 25, 2026 — 17 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/juev/nebula-mesh to 0.3.2 or later
go get github.com/juev/nebula-mesh@v0.3.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: go (1).

PackageEcosystemAffectedFixed In
github.com/juev/nebula-mesh
go
All versions0.3.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-47722?
nebula-mesh: Host advanced overrides allow YAML injection into agent config.yml This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2026-47722?
CVE-2026-47722 affects github.com/juev/nebula-mesh. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-47722 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-7hp6-g3pq-3pc3
GO-2026-5223

Related CVEs

  • CVE-2026-47724
    CRITICAL

    nebula-mesh: API endpoints lack ownership checks, enabling cross-operator privilege escalation

  • CVE-2026-107809
    HIGH

    Nginx-UI AuthRequired token cookie fallback enables CSRF against management APIs

  • CVE-2026-49258
    HIGH

    Nebula Mesh: Web UI lacks ownership checks, enabling cross-operator access to hosts and networks (read, block, delete)

  • CVE-2026-107813
    HIGH

    Nginx UI: Incomplete fix of CVE-2026-84315 - the api/cluster router was not - wrapped in RequireSecureSession, so those sensitive mutations run without OTP step-up

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies