/

CVE-2026-49819

Severity:

CRITICAL RISK

(9.8)

Missing Authentication (CWE-306) in UpSnap Web App API

CVE-2026-49819

Deferred

Vulnerability type

Category:

Missing Authentication and Privilege Escalation

CWE:

CWE-78, CWE-269, CWE-306, CWE-862

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

UpSnap contains a missing-authentication flaw in the initial superuser setup endpoint. On fresh or otherwise uninitialized deployments, a network-adjacent attacker may create the first administrator account, obtain a long-lived JWT, and potentially reach command execution through privileged wake-on-LAN functionality.

Affected context

The issue occurs in UpSnap deployments where the initial superuser endpoint is reachable and no superuser has yet been registered. The endpoint relies on a superuser-count check rather than authentication, a setup token, source-network restriction, or request throttling. After administrative access is obtained, functionality that constructs a shell command for wake-on-LAN operations may expose a path to execution with the application's operating-system privileges.

Exploit preconditions

  • Attack surface: The UpSnap HTTP API, specifically the initial superuser registration workflow
  • Required access: Network-adjacent access to a reachable UpSnap instance; prior authentication is not required
  • Trigger point: A request to the initial superuser handler while the deployment has no registered superusers
  • Why exploitation is possible: Authorization is absent and the only gate is a state-based count check; subsequent privileged functionality can invoke a shell command

Why this happens

The primary defect is a missing authorization check in a security-sensitive account-creation endpoint, mapping to CWE-306: Missing Authentication for Critical Function. The implementation treats the absence of existing administrators as sufficient authorization to create one, without requiring a one-time bootstrap secret or an equivalent trusted setup channel. The resulting administrative session can reach a command-execution path that builds a shell command from application-controlled wake-on-LAN data, creating a related CWE-78: Improper Neutralization of Special Elements used in an OS Command risk.

Potential impact

  • An unauthenticated attacker may create the initial superuser account
  • An attacker could obtain persistent administrative access through a long-lived JWT
  • The application may execute attacker-influenced commands with its operating-system privileges
  • The host could be modified, used for lateral movement, or used to access connected network resources
  • Data confidentiality, integrity, and availability could be affected

General mitigation guidance

Mitigation generally focuses on protecting bootstrap authorization and removing shell interpretation from privileged operations.

Common defensive patterns include:

  • Require a one-time, high-entropy setup token or an out-of-band administrative approval before creating the first superuser
  • Disable initial-account creation after a narrowly controlled setup state and enforce authorization on every account-management action
  • Restrict bootstrap endpoints through network policy or an administrative interface that is not broadly exposed
  • Apply rate limits, audit logging, and explicit server-side authorization checks to setup and authentication-sensitive routes
  • Prefer direct process execution with fixed argument lists over shell commands, and validate wake-on-LAN inputs against an allow-listed format
  • Run the service with a dedicated unprivileged account and limit filesystem, network, and container capabilities
  • Treat session tokens as short-lived, revocable credentials with secure storage and rotation controls

How teams detect issues like this

Detection can combine source review, runtime monitoring, and deployment policy enforcement:

  • Use static analysis to identify unauthenticated handlers that create privileged accounts or issue tokens
  • Review routes for missing middleware, setup checks based only on object counts, and long-lived token issuance
  • Search for shell-spawning APIs such as exec, system, or command interpreters receiving non-constant input
  • Monitor account creation, token issuance, and administrative actions from unexpected network sources
  • Alert on child-process creation by the web service and on command execution involving wake-on-LAN parameters
  • Enforce CI policies requiring authentication coverage and shell-command reviews for security-sensitive endpoints
  • Automated code-review tools may help identify missing authorization checks and command-injection patterns

Sources

SourceLink
github.comgithub.com/seriousm4x/UpSnap/releases/tag/5.4.0
github.comgithub.com/seriousm4x/UpSnap/security/advisories/GHSA-w4jr-728f-5jhq

Frequently asked

questions

It may be exploitable over the network when the UpSnap API is reachable and the deployment has not yet created a superuser. Exposure depends on network routing, firewall rules, and other access controls.

No. The initial superuser handler does not require authentication, and the vulnerable state is typically present on a fresh installation.

Protect initial account creation with a one-time bootstrap secret or controlled out-of-band setup process, then disable the bootstrap path. Also replace shell-based command construction with fixed, validated argument handling.

Apply authorization tests to every security-sensitive route, review state-based setup gates, limit token lifetime and privileges, restrict service permissions, and continuously scan for unsafe shell invocation patterns.

Find out what's already
exploitable in your codebase.