Severity:

CRITICAL RISK

(10.0)

Authentication and Certificate Validation Weakness

CVE-2026-4370

Analyzed

Vulnerability type

Category:

Authentication and Certificate Validation Weakness

CWE:

CWE-295, CWE-306

Impact:

Complete Database Compromise and Controller Takeover

Severity:

CRITICAL RISK

(10.0)

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

Juju's internal Dqlite database cluster fails to properly authenticate TLS clients and servers across certain 3.x and 4.x versions, allowing nodes to join the cluster without valid certificates.

An unauthenticated attacker with network access to the controller's Dqlite port can join the cluster and gain full read and write access to the controller database, potentially leading to complete data compromise and control over Juju-managed infrastructure.

Affected context

This vulnerability affects Juju controllers that:

  • Use the internal Dqlite database cluster for controller state
  • Expose the Dqlite port on a reachable network interface (e.g., within a management subnet, cluster network, or VPN)
  • Rely on TLS as the primary trust and authentication mechanism between cluster nodes

In such environments, new nodes can attempt to join the Dqlite cluster, but the controller does not sufficiently validate their TLS client certificates, allowing untrusted participants to be accepted as legitimate peers.

Exploit preconditions

  • Attack surface: The Juju controller's Dqlite listener port (typically only meant for cluster-internal communication).
  • Required access: Network-level reachability to the Dqlite endpoint; no prior authentication or valid certificate is required due to missing validation.
  • Trigger point: Initiating a Dqlite cluster join handshake toward the controller database endpoint, posing as a new cluster node.
  • Why exploitation is possible: The controller does not properly enforce mutual TLS authentication and client certificate validation for joining nodes, effectively treating any reachable peer as trusted and granting them full cluster membership rights.

Why this happens

The underlying flaw is an authentication and certificate validation weakness in the Dqlite clustering logic within Juju.

The system is designed to use TLS to secure communication between database nodes, but the controller does not correctly verify that connecting peers present valid, expected client certificates or identities. This maps to CWE-295: Improper Certificate Validation, where TLS is used without robust verification of peer credentials, and is related to CWE-306: Missing Authentication for Critical Function, because joining the database cluster—a highly privileged operation—is not gated by strong authentication.

Conceptually, the trust boundary between "internal, trusted cluster nodes" and "untrusted network clients" collapses when TLS is treated as encryption-only and not as an identity verification mechanism. As a result, any party that can reach the Dqlite port can be misclassified as a fully trusted cluster member.

Potential impact

  • Attacker may obtain full read access to all controller state stored in Dqlite, including model configuration, topology, and potentially sensitive metadata.
  • Attacker may gain unrestricted write access to the controller database, enabling arbitrary changes to models, applications, relations, and configuration.
  • Attacker could introduce malicious or corrupted state, potentially leading to loss of integrity, denial of service, or misconfiguration of managed workloads.
  • Attacker can impersonate legitimate cluster nodes, undermining auditability and trust in cluster membership.
  • Attacker may leverage controller compromise to pivot to additional infrastructure or services orchestrated by Juju.

General mitigation guidance

Effective mitigation focuses on hardening authentication for cluster membership and reducing exposure of internal database endpoints:

  • Enforce mutual TLS: Implement strict, mutual TLS authentication for all Dqlite cluster communications, ensuring that each node verifies the peer's certificate chain, hostname/identity, and revocation status before accepting it as a cluster member.
  • Bind to trusted networks only: Restrict Dqlite listener interfaces to dedicated, non-routable management networks or loopback interfaces where possible, minimizing exposure to untrusted clients.
  • Network segmentation and access control: Use firewalls, security groups, or service meshes to limit access to the Dqlite port exclusively to known controller and replica nodes.
  • Least-privilege cluster membership: Treat cluster join operations as highly privileged; require explicit authorization and identity proof for any node attempting to join.
  • Secure credential lifecycle: Use centrally managed certificate authorities, short-lived certificates, and automated rotation to keep node identities current and reduce risk of stale credentials.
  • Defense in depth around controller data: Encrypt sensitive data at rest where feasible and limit the spread of highly sensitive secrets within controller state to reduce impact if read access is gained.

How teams detect issues like this

Organizations can detect and monitor for this class of issue using a combination of code-level and operational controls:

  • Static analysis and code review:
  • Identify TLS client and server initialization paths that omit certificate verification, peer name checks, or mutual TLS configuration.
  • Flag any cluster-join logic that does not perform explicit authentication or authorization checks before admitting a node.
  • Review for hard-coded "insecure" TLS options (e.g., skipping verification, accepting all certificates, or test-mode flags).
  • Configuration and policy enforcement:
  • Enforce policies requiring mutual TLS and strong certificate validation for all internal control-plane services, including databases and coordination services.
  • Use infrastructure-as-code checks or policy-as-code tooling to ensure internal ports like Dqlite are not exposed outside approved networks.
  • Runtime monitoring:
  • Log and alert on cluster membership changes, new node joins, or unexpected Dqlite connections from unknown IP ranges.
  • Monitor for unusual write patterns, schema modifications, or mass state changes within the controller database.
  • Security testing:
  • Incorporate targeted tests in CI/CD pipelines and security assessments to verify that internal services reject unauthenticated or improperly certified clients.

Sources

SourceLink
github.comgithub.com/juju/juju/security/advisories/GHSA-gvrj-cjch-728p

Frequently asked

questions

It can be, but only if the controller's Dqlite port is exposed to untrusted networks. In many deployments, this port is restricted to internal or management networks. However, any environment where the Dqlite port is reachable from untrusted hosts is at high risk.

The attacker needs only network-level reachability to the Juju controller's Dqlite endpoint. No valid client certificate, credentials, or prior authentication are required due to the missing certificate validation and authentication on cluster joins.

The safest pattern is to enforce strict mutual TLS for all Dqlite cluster communication, validating client certificates and node identity before allowing any node to join the cluster, combined with restricting network access to the Dqlite port to a small, well-defined set of trusted hosts.

Design internal control-plane services under the assumption that network boundaries can fail, and always require strong, cryptographically enforced identity for critical operations like cluster membership. Standardize on secure TLS configurations, mandate certificate validation by default, and encode these expectations into development guidelines, code reviews, automated security checks, and deployment policies.

Find out what's already
exploitable in your codebase.