Summary
Gradient CI 1.1.0 allows unauthenticated registration of build workers via the /proto endpoint when GRADIENT_DISCOVERABLE=true (the default), accepting any fresh worker UUID without credentials.
An attacker who can reach this endpoint can join the worker pool with full PeerAuth::Open access, observe jobs from all organizations, and push arbitrary Nix store paths into shared storage, enabling build compromise and supply-chain attacks.
Affected context
This vulnerability affects Gradient CI deployments running version 1.1.0 where:
GRADIENT_DISCOVERABLEis set totrue(default behavior, including in the NixOS module), and- The
/protoendpoint is reachable from untrusted or partially trusted networks (e.g., broader internal networks, shared CI infrastructure).
In this configuration, the coordinator treats any new, previously unseen worker UUID as a legitimate worker and grants it PeerAuth::Open, exposing cross-organization jobs and shared artifact storage to untrusted parties.
Exploit preconditions
- Attack surface: Network access to the Gradient CI
/protoendpoint on an affected instance. - Required access: No prior authentication or credentials are required; the attacker only needs the ability to initiate connections and send protocol messages.
- Trigger point: The worker registration phase, during which the service accepts a fresh, never-before-registered worker UUID and establishes a session.
- Why exploitation is possible: The system does not enforce authentication (CWE-306) or strong identity verification for new workers (CWE-345), and grants open, cross-organization permissions (CWE-862) to any successfully registered worker.
Why this happens
The core issue is that worker registration relies solely on a fresh UUID as the worker identifier, treating "never seen before" as a sufficient condition for trust.
There is no authentication challenge, shared secret, or cryptographic proof binding the worker to a legitimate operator, nor is there authorization scoping at registration time. As a result:
- Any entity capable of speaking the protocol can present a new UUID and be accepted as a worker.
- The system assigns
PeerAuth::Opento such workers, granting them visibility into jobs across all organizations and the ability to push artifacts into shared storage.
This pattern aligns with:
- CWE-306 (Missing Authentication for Critical Function): The critical operation of joining the worker pool and gaining access to jobs and artifact storage is exposed without authentication.
- CWE-345 (Insufficient Verification of Data Authenticity): Worker identity is not verified through trustworthy mechanisms; possession of a random identifier is treated as authenticity.
- CWE-862 (Missing Authorization): Newly registered workers are automatically granted broad, cross-tenant permissions without evaluating whether they should have that scope.
Potential impact
- An attacker-controlled worker may see build jobs and metadata from every organization using the same Gradient instance.
- Malicious Nix store paths can be NarPush/NarUploaded into
nar_storageand related cache tables, poisoning shared build artifacts. - Supply-chain attacks can be mounted by injecting backdoored dependencies or binaries that downstream builds may trust and distribute.
- Confidential information, such as build configurations or internal code paths observed via job metadata, could be exposed.
- Build reliability and integrity can be undermined, leading to compromised releases or integrity violations across affected projects.
General mitigation guidance
Effective mitigation typically focuses on tightening worker onboarding, scoping, and network exposure, independent of any specific version:
- Require strong worker authentication: Design worker registration so that every worker must present credentials tied to a trusted operator (e.g., long-lived tokens, mutual TLS with per-worker certificates, or host-bound keys). Avoid treating unknown identifiers as inherently trustworthy.
- Verify worker identity and integrity: Introduce explicit checks that bind worker identity to a configured allowlist, provisioning system, or enrollment workflow, rather than ad hoc identifiers supplied at connection time.
- Apply least-privilege authorization: Scope workers to specific organizations, projects, or queues by default; avoid global
Openroles. Ensure that newly registered workers receive minimal, explicitly configured permissions. - Constrain network accessibility: Place control-plane endpoints (such as
/proto) behind internal networks, VPNs, or service meshes, and restrict access to known CI nodes where feasible. - Isolate artifact storage: Treat shared stores (like
nar_storageand cached path tables) as sensitive; use permissions, namespaces, or separate storage per tenant or environment to limit blast radius. - Harden defaults: Configure deployment templates and modules so that discoverable/auto-registration modes are disabled or significantly constrained unless an administrator explicitly opts in with appropriate controls.
How teams detect issues like this
Detecting and monitoring for this class of weakness involves both configuration review and runtime observability:
- Configuration and policy checks:
- Review deployment manifests, NixOS modules, and infrastructure-as-code for flags or options that enable open worker discovery or auto-registration without credentials.
- Adopt policy-as-code rules that flag CI endpoints or services exposing critical operations without authentication.
- Log and telemetry analysis:
- Monitor worker registration logs for unusual patterns, such as sudden increases in new worker UUIDs, workers from unexpected IP ranges, or short-lived workers.
- Track NarPush/NarUploaded events and compare them against allowed actor lists; flag uploads originating from newly registered or unknown workers.
- Network-level controls:
- Use firewalls or service mesh policies to restrict which subnets or services can reach
/protoand similar control-plane endpoints; log and alert on violations. - Automated review:
- Include this class of issue in architectural and security reviews of CI/CD systems, using automated scanners or configuration linters where available to detect unauthenticated control operations.

