AnyIO, POSIX Privilege Dropping, CVE-2026-63349 (Medium) -DC-Sep2026-2496

Listen to this Post

AnyIO is an asynchronous concurrency and networking framework that runs on top of asyncio or Trio. In version 4.14.0, the library introduced support for the POSIX `extra_groups` argument in its subprocess helper functions, `anyio.run_process()` and anyio.open_process(). This argument allows a parent process to explicitly define the supplementary group list for a child process, which is a critical mechanism for privilege separation. When an application wants to drop privileges before executing a less-trusted child task, it can pass `extra_groups=[]` to clear any inherited supplementary groups. This ensures the child process does not retain the elevated group memberships of its parent. Python’s standard `subprocess.run()` handles this correctly, clearing the supplementary group list as expected.
However, a logic error was introduced in anyio.open_process(). When the `extra_groups` parameter is not None, the function incorrectly assigns the value of a different parameter, group, to the backend’s `extra_groups` field. The erroneous assignment takes the form `kwargs[“extra_groups”] = group` instead of kwargs["extra_groups"] = extra_groups. Consequently, the actual supplementary group list specified by the caller is silently ignored. If a caller supplies `extra_groups=[]` intending to clear inherited groups, the child process instead retains the parent’s supplementary groups, completely undermining the intended privilege-dropping boundary. This flaw is particularly dangerous in containerized environments where a parent process may have a synthetic supplementary group list that should not be propagated.
The vulnerability manifests in two distinct failure modes. First, when `extra_groups` is provided but `group` is not, the child process launches successfully but with the wrong group configuration—a silent security failure. Second, if both `group` and `extra_groups` are supplied, the integer value of `group` is passed where an iterable of supplementary groups is expected. This type mismatch causes the process launch to fail entirely with a TypeError. Both outcomes break the expected behavior of the API. The issue affects any POSIX application that relies on AnyIO’s subprocess helpers to launch less-privileged child processes. The vulnerability has been assigned CVE-2026-63349 and is classified as a medium-severity issue due to its local attack vector and the high privileges required for exploitation. It has been fixed in AnyIO version 4.14.2.

DailyCVE Form:

Platform: Linux POSIX
Version: 4.14.0
Vulnerability : wrong extra_groups
Severity: Medium
date: 2026-09-18

Prediction: 2026-09-25

What Undercode Say:

Analytics:

Check installed AnyIO version
python -c "import anyio; print(anyio.<strong>version</strong>)"
Demonstrate the vulnerability in a Python script
python3 - <<'EOF'
import anyio, os, subprocess
async def main():
Show parent supplementary groups
parent_groups = os.getgroups()
print(f"Parent supplementary groups: {parent_groups}")
Standard subprocess clears groups correctly
result = subprocess.run(
["python3", "-c", "import os; print(os.getgroups())"],
extra_groups=[],
capture_output=True,
text=True
)
print(f"subprocess.run groups: {result.stdout.strip()}")
AnyIO fails to clear groups
result = await anyio.run_process(
["python3", "-c", "import os; print(os.getgroups())"],
extra_groups=[],
stdout=subprocess.PIPE
)
print(f"anyio.run_process groups: {result.stdout.decode().strip()}")
anyio.run(main)
EOF
Minimal code path showing the wrong assignment
In anyio.open_process():
kwargs = {}
if extra_groups is not None:
kwargs["extra_groups"] = group BUG: should be extra_groups

Exploit: (Educational Purposes!)

In a Linux container, create a parent with supplementary group
newgrp docker &
Inside the parent, run an AnyIO script that attempts to drop groups
python3 -c "
import anyio, subprocess, os
async def main():
This child should have NO supplementary groups
r = await anyio.run_process(
['id', '-G'],
extra_groups=[],
stdout=subprocess.PIPE
)
print('Child groups:', r.stdout.decode().strip())
print('Expected: empty or primary only')
anyio.run(main)
"

Protection: from this CVE

Upgrade to AnyIO 4.14.2 or later
pip install --upgrade "anyio>=4.14.2"
Verify the fix is active
python -c "
import anyio, inspect
src = inspect.getsource(anyio.open_process)
assert 'kwargs[\"extra_groups\"] = extra_groups' in src, 'Still vulnerable'
print('Patched')
"

Impact:

Applications using AnyIO 4.14.0 or 4.14.1 on POSIX systems that rely on `extra_groups` to drop supplementary privileges may launch child processes with unintended group memberships. This can lead to privilege escalation if the child process is expected to be less privileged. The failure mode is silent when only `extra_groups` is supplied, and produces a `TypeError` when both `group` and `extra_groups` are passed. The issue affects any POSIX application using these AnyIO subprocess helpers for privilege separation, with a CVSS 4.0 base score of 7.0 (High) for local attacks requiring high privileges.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top