Cloud Security

Cloudflare Workers, KV, and Durable Objects: the supply chain view in 2026

Worker bundle composition, wrangler publish trust, and the deploy-from-CI credential blast radius are the supply chain shape of Cloudflare in 2026.

Hritik Sharma
Security Engineer
7 min read

Cloudflare Workers turned the V8 isolate into a serverless platform, and the model has worn well: a Worker is a small bundle of JavaScript or WebAssembly that runs at the edge, with persistent state available through KV for high-read low-write key-value data and Durable Objects for stronger consistency. The model is operationally simple, which is a feature, but the same simplicity has compressed several distinct trust questions into one wrangler command. The wrangler CLI bundles the code, resolves the dependencies, packages the result, and publishes to your Cloudflare account through an API token, and at every step there are choices that affect supply chain risk.

This post is about the 2026 controls for Workers, KV, and Durable Objects from a supply chain perspective. We assume you have one or more Workers in production, you deploy them from CI, and you are evaluating where the trust surface concentrates and what to gate.

What does wrangler actually bundle and publish?

The wrangler CLI takes your source entrypoint, runs an esbuild-based bundling pass over it, resolves the npm dependencies you have imported (along with their transitive closures), and produces a single bundle that is uploaded to the Workers runtime through the Cloudflare API. The bundle is what runs at the edge, and the dependencies that ended up in the bundle are part of every request that the Worker handles. The wrangler.toml file pins the bindings (KV namespaces, Durable Object namespaces, R2 buckets, secrets) that the Worker has access to, and those bindings become available to the bundle as ambient runtime APIs.

The trust implication is that the npm dependencies in the bundle have access to every binding the Worker is configured with. A compromised dependency can read every KV value the Worker can read, can write to every KV namespace the Worker can write, can invoke every Durable Object the Worker can talk to, and can read every secret the Worker has been provisioned. The isolate boundary protects the host and the other tenants on the platform, but it does not protect your data from your own code, which is the relevant boundary for a supply chain incident.

How is the wrangler publish credential the actual blast radius?

The wrangler publish step authenticates to Cloudflare with an API token that, in most CI configurations, has write access to deploy Workers, to manage routes, to read and write KV values, and to manage Durable Objects within the account or zone scope. The token typically lives as a CI secret, and the CI job that runs wrangler publish runs that command with the token in its environment. Anything that runs in that CI job, including any postinstall hook of any dependency of wrangler or of the Worker itself, has access to the token.

The blast radius of a compromised CI publish step is the union of what the token can do, which in many configurations is the entire Workers fleet for the account. We have seen incident scenarios where a malicious dependency in a Worker's transitive tree exfiltrated the CF_API_TOKEN from the CI environment, used it to enumerate and modify routes for other Workers in the same zone, and persisted a redirect that exfiltrated request data from production traffic for days before being noticed. The CI-to-Cloudflare path is the leverage point, and securing it pays better than almost anything else you can do at the Worker level.

What does a hardened Workers deploy pipeline look like in 2026?

The first hardening step is to scope the deploy API token. Cloudflare supports fine-grained API tokens with resource-level permissions, and a publish job for a single Worker should have a token that can deploy that Worker and nothing else, with read access to the specific KV namespaces and Durable Object namespaces that Worker uses. The blanket Account.Workers Scripts:Edit token that many teams start with is the wrong permission shape for production.

The second hardening step is to authenticate the CI job to Cloudflare without a long-lived secret at all. Cloudflare supports OIDC-based authentication for GitHub Actions and a growing list of CI providers, which lets a CI job exchange its workload identity token for a short-lived Cloudflare credential scoped to the specific deploy operation. The token does not live in CI secrets, the exchange is logged, and the credential expires in minutes rather than living indefinitely. The third hardening step is to break the public npm registry trust by pointing wrangler's npm install at a curated internal registry with a deny list and a freshness floor. The fourth is to produce an SBOM of the published bundle and require a Safeguard or equivalent attestation before the Worker is allowed to take production traffic; route-level promotion through canary patterns gives you a place to enforce that.

How does the KV and Durable Object data surface change the threat model?

KV and Durable Objects are convenient enough that they accumulate data. KV often grows to hold session data, cached responses, feature flags, and small reference tables. Durable Objects hold actor state for things like collaborative editing, rate-limit counters, and live game state. From a supply chain perspective, the relevant question is what a compromised dependency in a Worker bundle could do with that data, and the answer is everything that any code path in the Worker can do.

The mitigation is to be deliberate about what lives in KV and in Durable Object state. Avoid storing long-lived secrets in KV; use the Workers Secrets binding for those, and pull them through a code path that is auditable. Avoid concentrating data from many tenants under a single namespace whose access is keyed only on the request path; partition namespaces by tenant where it matters, so that a compromised Worker for one tenant cannot read another tenant's data. And keep the Durable Object scripts that hold sensitive state separate from the Workers that hold most of your dependency surface, so that the blast radius is bounded by the smaller code path.

How do you keep the Workers fleet inventory honest?

Workers proliferate. A team that started with a few Workers often ends up with dozens, each with its own wrangler.toml and its own dependency state, and the inventory drifts because nobody is responsible for the union. The query that pays best is the join across all Workers in your account of the dependencies in each bundle, the bindings each Worker has access to, the routes each Worker is mounted on, and the last publish date. Surface the cases where a Worker has bindings broader than its routes justify, and the cases where a Worker has not been republished in ninety days.

The complementary practice is rebuild cadence. A Worker that was published four months ago is shipping a dependency tree that was resolved against npm at that time, and the bundle currently serving traffic is built against whatever the dependency state was on that day. Scheduling rebuilds (triggered by CI on a cadence) is how you keep the deployed surface from drifting into a state where the dependency tree of every Worker is stale and increasingly vulnerable. The rebuild also revalidates the chain against the current allowlist, which catches the case of a dependency that was approved months ago and has since been flagged.

How Safeguard Helps

Safeguard treats every Cloudflare Worker as a deployable with an SBOM, a provenance attestation, and a reachability profile, tied to the bindings (KV, Durable Objects, secrets, R2) the Worker has access to. Griffin AI correlates the dependencies in your Worker bundles against TPRM supplier records and recent compromise indicators, and surfaces the cases where a transitive dependency is the actual blast-radius driver behind a Worker's risk profile when weighted by the bindings it can reach. Policy gates plug into your wrangler publish pipeline so that a Worker without a valid attestation, or with a binding scope broader than its policy allows, is refused before it takes production traffic. Our reachability engine isolates the CVEs that the Worker's actual code path exercises, so the noise of bundler-pulled transitive trees does not drown out the findings that matter, and the audit trail of blocked publishes becomes evidence of policy enforcement.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.