/

CVE-2026-25791

Severity:

HIGH RISK

(7.5)

Improper Authentication and Resource Exhaustion

CVE-2026-25791

Analyzed

Vulnerability type

Category:

Improper Authentication and Resource Exhaustion

CWE:

CWE-306, CWE-400

Impact:

Denial of Service via Memory Exhaustion

Severity:

HIGH RISK

(7.5)

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

Sliver's DNS C2 listener previously accepted unauthenticated TOTP bootstrap messages and created server-side DNS sessions without validating one-time password values, even when OTP enforcement was configured.

A remote attacker could repeatedly create bogus sessions that are never cleaned up, driving unbounded memory growth and potentially causing denial of service on the Sliver server.

Affected context

This vulnerability affects Sliver command and control deployments using the DNS C2 listener with TOTP-based bootstrap and EnforceOTP enabled.

In this configuration, the server is expected to verify OTP tokens before allocating resources for new sessions.

However, in affected versions, the DNS C2 listener would accept bootstrap messages without validating the OTP and would create in-memory DNS sessions for each attempt, with no expiry or cleanup in this specific code path.

Environments exposing the DNS C2 endpoint to untrusted or internet-facing networks are most at risk.

Exploit preconditions

  • Attack surface: Network-exposed DNS C2 listener endpoint.
  • Required access: Remote network access capable of reaching the DNS C2 listener; no prior authentication or valid OTP is required.
  • Trigger point: Sending repeated TOTP bootstrap messages to the DNS C2 listener, which are processed as if valid.
  • Why exploitation is possible:
  • The listener allocates server-side DNS session structures on receipt of bootstrap messages.
  • OTP values are not validated in this path, even when EnforceOTP is enabled.
  • Allocated sessions lack an expiry/cleanup mechanism for this flow, allowing unbounded accumulation in memory.

Why this happens

The issue stems from a combination of improper authentication enforcement and unbounded resource allocation.

Conceptually, the DNS C2 listener contains a code path where TOTP-based bootstrap messages are treated as trusted without verifying the OTP value against an expected secret, mapping to CWE-306: Missing Authentication for Critical Function.

Once accepted, the server allocates in-memory DNS session objects but does not attach them to a lifecycle that includes expiry, garbage collection, or quota enforcement in this specific flow.

This leads to CWE-400: Uncontrolled Resource Consumption, as an attacker can trigger repeated allocations of session state without corresponding release or limits.

Potential impact

  • The Sliver server process may consume excessive memory, impacting overall system performance.
  • The host running Sliver could experience resource starvation, affecting other services.
  • The Sliver C2 functionality can be degraded or become unavailable, effectively causing a denial of service.
  • In extreme cases, the operating system may terminate the process or become unstable due to memory pressure.

General mitigation guidance

Mitigation generally focuses on enforcing authentication checks before resource allocation and introducing strong resource lifecycle controls.

Common defensive patterns include:

  • Ensuring OTP / authentication validation occurs before any long-lived session or object allocation, especially in bootstrap or handshake paths.
  • Implementing session lifecycle management with explicit expiry, idle timeouts, and cleanup for all code paths that create server-side session objects.
  • Adding per-source and global rate limiting or quotas for bootstrap and session-creation requests to bound memory growth.
  • Designing listeners to fail closed when security features such as EnforceOTP are configured, so misconfigurations or incomplete implementations do not default to permissive behavior.
  • Applying general hardening such as process-level memory limits and monitoring to detect abnormal resource consumption early.

How teams detect issues like this

Effective detection typically combines runtime monitoring with code-centric analysis:

  • Static analysis and code review:
  • Look for code paths that perform session creation or allocate persistent state before completing authentication or OTP checks.
  • Identify session or connection tracking structures that lack expiry, reference counting, or cleanup logic.
  • Flag conditional security features (like EnforceOTP) where the enforcement logic is not consistently applied across all entry points.
  • Runtime monitoring:
  • Track the number of active DNS C2 sessions and overall memory usage of the Sliver process over time.
  • Set alerts on anomalous spikes in bootstrap attempts or session counts from the same or diverse IPs.
  • Automated policy enforcement:
  • Use CI/CD checks or automated review tools to enforce patterns such as "no resource allocation before auth" and "all session containers must have timeouts and eviction policies."

Sources

SourceLink
github.comgithub.com/BishopFox/sliver/releases/tag/v1.7.0
github.comgithub.com/BishopFox/sliver/security/advisories/GHSA-wxrw-gvg8-fqjp

Frequently asked

questions

Yes. Any remote actor who can reach the DNS C2 listener over the network can exploit this issue without valid credentials or a correct OTP value.

The attacker only needs network-level access to the DNS C2 endpoint. No prior authentication, enrollment, or control over Sliver agents is required to trigger memory exhaustion.

The safest pattern is to enforce OTP and authentication checks before any session or persistent-state allocation, and to ensure all session creation paths have robust expiry and cleanup. Additionally, applying rate limiting and quotas on bootstrap flows can provide a strong secondary safeguard.

Prevention typically involves designing protocols so that security checks occur before resource allocation, standardizing session lifecycle management with mandatory timeouts, and adopting secure coding guidelines that flag any unauthenticated resource creation paths during design and review. Integrating these rules into automated testing and code review helps catch regressions early.

Find out what's already
exploitable in your codebase.