← Back to writing

Why a control plane shouldn't hold your API keys

On November 13, 2026, Dokploy published a security notice about AI provider API keys on Dokploy Cloud. The day before, a Cloud customer had reported unauthorized use of a key they had configured in the product. While looking into that report, Dokploy found a vulnerability in the shared Cloud instance: a logged-in user could escalate their privileges and reach AI provider API keys stored in other organizations.

They have fixed the vulnerability. They have also been clear about what they do not yet know. They have not confirmed that any API keys were actually accessed, and they cannot rule it out. They have not confirmed that the bug is what caused the unauthorized usage, and they are still looking at other possible causes. They have received a couple of reports of unauthorized key usage, which they are investigating. They have not confirmed unauthorized access to anything else, including customer servers and services. Self-hosted instances, they say, should not be affected, because this was specific to Dokploy Cloud, where many organizations share the same instance.

As a precaution they emailed every Cloud organization owner who had an AI provider configured, and asked those customers to rotate their keys and check their provider usage dashboards. They had already stopped returning saved API keys to the browser on October 15. That is a responsible way to handle an incomplete investigation, and I am treating their account as the official one.

Users have been discussing it in a thread on r/dokploy titled “Anthropic API potentionally leaked by Dokploy”. The original poster said they had an Anthropic API key they had only ever added to a Dokploy instance, and that it had been dormant for a couple of months: “Last night the API key had unauthorized usage and used up all my credit.” A commenter said they had the exact same thing with an OpenAI key created only for Dokploy — about $100 of spend in an hour, on the Cloud service.

A member of the Dokploy team replied in the thread, pointed to the official notice, apologized, and repeated the same account: the vulnerability is fixed, they have not confirmed that keys were taken, they cannot rule it out, and they do not yet know if it is connected to these reports. These are user reports, not proof of the cause. A key that was used nowhere else being drained overnight is still hard to explain otherwise.

The point I want to sit with is simpler than whether this particular bug was exploited. The keys were in the control plane. On a multi-tenant cloud, a privilege-escalation bug in that control plane is a path to other customers' credentials. Even if the cause is still unconfirmed, the recommendation to rotate is the cost of that design.

The same week, in the self-hosted product

On November 12, the same day as the Cloud report, Dokploy also published two advisories in the self-hosted product. Both are fixed in v0.31.1.

In one, rated High, any authenticated user could read another organization's Git provider credentials — GitHub App private keys and client secrets, GitLab and Gitea OAuth secrets and tokens, Bitbucket API tokens — because some API handlers checked that you were signed in, but not that the credential belonged to your organization.

In the other, rated Moderate, a failed Railpack build sent the full build command to every notification channel. That command included every environment variable of the application, so one failed build put every application secret in plain text into email, Slack, Discord, Telegram, or a webhook. Failed database backups could do the same with the database password and the S3 destination keys. The same text also landed in Dokploy's own container log. The advisory includes a report that on October 23, 2026, one failed build sent all 14 secrets of a production application to email.

I do not think this is a story about careless maintainers. Dokploy published a Cloud notice, emailed affected owners, and shipped patches. A lot of people run real workloads on that product because it made self-hosting on a small VPS practical. The story is about what the architecture allows. If the dashboard stores readable API keys, Git tokens, and application secrets, then a bug in the web app — or a failed build that echoes a command — is a path to those secrets. That is the same point I was making in the earlier post about SSH keys, applied to a broader class of credentials.

The alternative I am building

This is why the design for Moonglass, which is not released yet, keeps readable credentials out of the control plane.

The earlier post was about SSH keys: the server runs an agent that dials out, and the dashboard never holds a key of yours. The same instinct applies to secrets. The plan is that the control plane never stores a readable value. Secret values are encrypted to a key that exists only as wrapped copies for authorized agents and for the owner's recovery key, which is kept off the server. A stolen backup of the control-plane database should yield nothing an attacker can read.

That does not make a running, compromised control plane harmless, and the threat model says so. It does mean the default failure of “the dashboard had the keys” is not supposed to be available.

If you used an AI provider on Dokploy Cloud, do what they asked: rotate the key at the provider, update it in Dokploy, revoke the old one, and check usage you do not recognize. If you self-host Dokploy, the two advisories above are fixed in v0.31.1.

I am building Moonglass in the open. If you want to follow along, there is a waitlist at moonglass.dev.