CVE-2026-55761High· 5.9▾ TwilightPortainer has Unauthenticated Restore Endpoint that Allows Admin Takeover on Uninitialized Instances
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 32.5 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Aug 28.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
0.5%
Portainer supports restoring an instance from a backup archive via the /api/restore endpoint. This endpoint is intentionally unauthenticated to allow restoring before the first admin account is created, and remains accessible for the five-minute initialization window that opens each time Portainer starts. Any unauthenticated attacker with network access to a Portainer instance that has not yet been initialised can exploit this window to replace the Portainer database with a crafted archive containing attacker-controlled credentials and gain full administrative access. The same unauthenticated setup window also exposes the administrator-account-creation endpoint (/api/users/admin/init), which an attacker can call to create the first administrator directly; the fix gates both endpoints.
The attack requires the instance to be uninitialized, reachable by the attacker, and within the five-minute window. Once that window expires without initialization, Portainer locks its API and requires a restart to re-enable setup — each restart opens a fresh window. No credentials, session tokens, or local access are required.
High
The endpoint requires no authentication and no user interaction, but successful exploitation depends on three conditions holding simultaneously: the instance must be uninitialized, reachable from the attacker's network, and within the five-minute setup window that Portainer enforces before locking the instance pending a restart. Once those conditions are met, the attack itself is straightforward — no specialized tooling or elevated privileges are needed. The vulnerable system impact is limited by the precondition: a brand new instance carries no confidential data, no existing users, and no running workloads, so the direct integrity and availability impact is low. The severity is driven entirely by the subsequent-system chain — Portainer CE is typically bound to a Docker socket that grants root-equivalent access to the host, and the compromised admin account inherits credentials and API access for every Docker host, Kubernetes cluster, and edge agent registered in the instance.
The unauthenticated initialization path has been present since the backup/restore feature was introduced.
Fixes are included in the following releases:
| Branch | First vulnerable | Fixed in |
|---|---|---|
| 2.39.x (LTS) | 2.39.0 | 2.39.4 |
| 2.43.x (STS) | all prior | 2.43.0 |
Portainer releases prior to 2.39.0 are end-of-life and will not receive a fix. This includes the 2.33.x LTS line. Users on end-of-life versions should upgrade to a supported branch.
Administrators who cannot immediately upgrade can reduce exposure by:
--admin-password or --admin-password-file, supplying a pre-set administrator password. The admin account then exists from first boot, so the instance is never in the uninitialised state that the restore and admin-init endpoints depend on — there is no setup window for an attacker to race. This is the most effective workaround for new, internet- or network-facing deployments. Instances on genuinely trusted networks (air-gapped or isolated private LANs) don't require it.None of these replace the fix.
The vulnerability is in api/http/handler/backup/handler.go and api/http/handler/backup/restore.go. The handler registers the restore endpoint with bouncer.PublicAccess, bypassing all authentication middleware:
// api/http/handler/backup/handler.go — NewHandler
h.Handle("/restore", bouncer.PublicAccess(httperror.LoggerHandler(h.restore))).Methods(http.MethodPost)
The restore handler then checks only whether the instance has been initialised before proceeding:
// api/http/handler/backup/restore.go — restore
func (h *Handler) restore(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
initialized, err := h.adminMonitor.WasInitialized()
if err != nil {
return httperror.InternalServerError("Failed to check system initialization", err)
}
if initialized {
return httperror.BadRequest("Cannot restore already initialized instance", errors.New("system already initialized"))
}
h.adminMonitor.Stop()
// Proceeds to restore the archive unconditionally
The fix introduces a one-time setup token that gates the public initialization endpoints — both administrator account creation (/api/users/admin/init) and restore (/api/restore) — while an instance is uninitialised. On startup, when no administrator account exists and no admin password was supplied through configuration, Portainer generates a cryptographically random token and writes it to the server logs. The restore and admin-init handlers reject any request that does not present this token in an X-Setup-Token header, returning 403 Forbidden. Deployments that provision the administrator password at deploy time (--admin-password / --admin-password-file) require no token; the requirement can be pinned to an operator-chosen value (--setup-token) or disabled on trusted networks (--no-setup-token). The same change is backported to release/2.39 for the 2.39.4 release.
/var/run/docker.sock); an attacker with Portainer admin access can use container creation APIs to mount the host filesystem and execute commands as root.develop./api/restore endpoint. Coverage of the companion administrator-account-creation endpoint (/api/users/admin/init) was added by the Portainer team as part of the fix.github.com/portainer/portainer >= 2.39.0, < 2.39.4github.com/portainer/portainer >= 2.40.0, < 2.43.0Upgrade to a patched release:
github.com/portainer/portainer 2.39.4github.com/portainer/portainer 2.43.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-44885Medium· 5.5Portainer has a path traversal in backup archive extraction that allows arbitrary file write
CVE-2023-49105Critical· 9.8An issue was discovered in ownCloud owncloud/core before 10.13.1
CVE-2019-1946Medium· 6.5A vulnerability in the web-based management interface of Cisco Enterprise NFV Infrastructure Software (NFVIS) could allow an unauthenticated, remote attacker to bypass authentication and get limited access to the web-based management int…
CVE-2020-12812Critical· 9.8An improper authentication vulnerability in SSL VPN in FortiOS 6.4.0, 6.2.0 to 6.2.3, 6.0.9 and below may result in a user being able to log in successfully without being prompted for the second factor of authentication (FortiToken) if t…
CVE-2022-40684Critical· 9.8An authentication bypass using an alternate path or channel [CWE-288] in Fortinet FortiOS version 7.2.0 through 7.2.1 and 7.0.0 through 7.0.6, FortiProxy version 7.2.0 and version 7.0.0 through 7.0.6 and FortiSwitchManager version 7.2.0 …
CVE-2023-35078Critical· 9.8An authentication bypass vulnerability in Ivanti EPMM allows unauthorized users to access restricted functionality or resources of the application without proper authentication.