CVE-2026-69157: Unauthenticated Administrative Takeover via /setup in Atomic Server

Vulnerability ID: CVE-2026-69157
CVSS Score: 9.8
Published: 2026-11-18

CVE-2026-69157 (GHSA-pfwx-xjp4-qxcj) is a critical missing authentication vulnerability (CWE-306) affecting Atomic Server versions 0.29.0 through 0.40.2. During initial deployment, the server exposes an unauthenticated /setup endpoint that generates an invite token granting root write permissions across the entire Drive. Because the invite redemption handler discards the redeemer identity, an unauthenticated remote attacker can intercept or request this setup invite on an unclaimed instance, register an arbitrary Agent public key, and assume full administrative control over the database.

TL;DR

Atomic Server versions 0.29.0 through 0.40.2 expose an unauthenticated /setup bootstrap endpoint that issues a single-use administrative invite with full Drive write privileges. Any unauthenticated attacker with network access to a fresh, unclaimed deployment can claim the invite, register an attacker-controlled Agent, and gain complete administrative control over all data and permissions.

⚠️ Exploit Status: POC

Technical Details

  • Vulnerability Type: CWE-306: Missing Authentication for Critical Functionality
  • Affected Versions: atomic-server 0.29.0 through 0.40.2
  • Attack Vector: Network (Unauthenticated HTTP GET/POST to /setup)
  • CVSS v3.1 Score: 9.8 Critical (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
  • EPSS Score: 0.51% (44.33th Percentile)
  • Impact: Full Administrative Takeover (DriveRights::All on Root Drive)
  • Exploit Status: Public Proof-of-Concept Available
  • CISA KEV Status: Not Listed

Affected Systems

  • ontola/atomic-server
  • atomic-server
  • atomic_lib
  • atomic-cli
  • atomic-server-tauri
  • atomic-server: >= 0.29.0, <= 0.40.2 (Fixed in: None (Partial fix in commit 98517d8921c78bd9b728a2459378c184ebf8a969))

Code Analysis

Commit: 98517d8

Serialize invite redemption with INVITE_REDEEM_LOCK mutex and fix inverted expiration timestamp comparison in server/src/plugins/invite.rs

diff --git a/server/Cargo.toml b/server/Cargo.toml index ab939f4d48..7d750345c2 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -126,7 +126,7 @@ features = ["derive"] version = "1" [dependencies.tokio] -features = ["time"] +features = ["time", "sync"] version = "1" [dependencies.image] diff --git a/server/src/plugins/invite.rs b/server/src/plugins/invite.rs index 93d4f0852d..852d645c06 100644 --- a/server/src/plugins/invite.rs +++ b/server/src/plugins/invite.rs @@ -8,6 +8,15 @@ use atomic_lib::{ utils::check_valid_url, Resource, Storelike, Value, }; +use std::sync::LazyLock; +use tokio::sync::Mutex; + +/// Serializes invite redemption so two concurrent requests can't both read +/// `usagesLeft == 1`, both decrement, and both succeed at what's meant to be a +/// single use (see `construct_invite_redirect` below). There's no atomic +/// check-and-decrement on an arbitrary property in the store, so a process-wide +/// lock around that read-decide-write is what closes the race. +static INVITE_REDEEM_LOCK: LazyLock<Mutex<()>> = LazyLock::new(|| Mutex::new(())); /// If there is a valid Agent in the correct query param, and the invite is valid, update the rights and respond with a redirect to the target resource #[tracing::instrument(skip(context))] @@ -84,6 +93,18 @@ pub fn construct_invite_redirect<'a>( .await .map_err(|_| format!("Target for invite does not exist: {}", target))?; + // Check expiry before consuming a usage, so an expired attempt doesn't burn + // one of the invite's remaining uses. + if let Ok(expires) = db_resource.get(urls::EXPIRES_AT) { + if expires.to_int()? < atomic_lib::utils::now() { + return Err("Invite has expired".into()); + } + } + + // Holds across the whole read-decide-write below so a concurrent redemption + // of the same invite can't slip in between the check and the decrement. + let _redeem_guard = INVITE_REDEEM_LOCK.lock().await; + // If any usages left value is present, make sure it's a positive number and decrement it by 1. if let Ok(usages_left) = db_resource.get(urls::USAGES_LEFT) { let num = usages_left.to_int()?; @@ -104,12 +125,6 @@ pub fn construct_invite_redirect<'a>( .map_err(|e| format!("Unable to save updated Invite. {}", e))?; } - if let Ok(expires) = db_resource.get(urls::EXPIRES_AT) { - if expires.to_int()? > atomic_lib::utils::now() { - return Err("Invite is no longer valid".into()); - } - } - // Make sure the creator of the invite is still allowed to Write the target let invite_creator = crate::plugins::versioning::get_initial_commit_for_resource(target, store) 

Exploit Details

  • GitHub: Public Proof-of-Concept Python script and mass scanner that fingerprints atomic-server, retrieves the unauthenticated /setup invite, and registers an administrative Agent.

Mitigation Strategies

  • Network Isolation on First Boot: Bind atomic-server strictly to localhost (127.0.0.1) during deployment until the initial administrator Agent is created and the setup invite is consumed.
  • Reverse Proxy Endpoint Blocking: Configure Nginx, Caddy, or a cloud WAF to block all external traffic to the /setup path while permitting only loopback connections.
  • Immediate Invite Consumption: Automate deployment pipelines to immediately redeem the /setup invite upon process startup so usagesLeft is decremented to 0 before external routing is enabled.
  • Permission Auditing: Inspect the write authorization list on the root Drive resource and review initial commit histories to verify no unauthorized Agents claimed the server.

Remediation Steps:

  1. Update atomic-server source builds to incorporate commit 98517d8921c78bd9b728a2459378c184ebf8a969 to remediate the usagesLeft TOCTOU race condition and inverted expiry logic.
  2. Deploy a reverse proxy rule blocking HTTP GET and POST requests to /setup* from non-loopback IP addresses.
  3. If deploying a new instance, claim the /setup invite locally via 127.0.0.1 immediately after initialization.
  4. Audit existing server logs and registered Agents for signs of unauthorized /setup redemption.

References

Read the full report for CVE-2026-69157 on our website for more details including interactive diagrams and full exploit analysis.