Linux AppArmor Bypass via aa-exec (CVE-2026-46331)
Adversaries can exploit CVE-2026-46331 to bypass AppArmor and unprivileged user namespace restrictions on Linux systems by abusing the `aa-exec` utility with `trinity`, `chrome`, or `flatpak` AppArmor profiles, leading to privilege escalation when the `aa-exec` binary itself is executed from a non-standard path.
CVE search metadata
CVE search record: CVE-2026-46331. Severity: high. CVSS: 7.8. EPSS: 0.53%. KEV: no. Product: AppArmor, aa-exec, AppArmor trinity profile, AppArmor chrome profile, AppArmor flatpak profile, trinity, chrome, flatpak, userns. Brief: Linux AppArmor Bypass via aa-exec (CVE-2026-46331). Brief link: https://feed.craftedsignal.io/briefs/2026-07-apparmor-bypass/
What's new
- 1. new IOCs Jul 27, 19:52 via splunk-escu
CVE-2026-46331 describes a privilege escalation vulnerability on Linux systems, specifically targeting the aa-exec utility when combined with certain AppArmor profiles like trinity, chrome, or flatpak. This vulnerability allows attackers to bypass Ubuntu's unprivileged user namespace restrictions by tricking aa-exec into granting namespace-creation capabilities to an arbitrary binary, rather than the legitimate application the profile was intended to confine. Defenders should be aware that adversaries may exploit this to gain elevated privileges, enabling further compromise of the system. Detection focuses on instances where aa-exec is invoked with specific profile arguments (-p, --) and when the aa-exec binary itself is executed from unexpected or non-standard directory paths, signaling an attempt to exploit this bypass. This technique can lead to full system compromise if successful.
Attack Chain
- An attacker gains initial user-level access to a vulnerable Linux system.
- The attacker identifies a
aa-execconfiguration on the system that utilizesuserns-carrying AppArmor profiles, such astrinity,chrome, orflatpak. - The attacker crafts a malicious command that invokes
aa-execwith arguments specifying one of the vulnerable AppArmor profiles (e.g.,-p flatpak). - The crafted command includes the
--separator, followed by a path to an arbitrary, attacker-controlled binary (e.g., a shell or a privilege escalation tool). - To evade detection, the attacker ensures the
aa-execbinary itself is executed from a non-standard or unusual directory path, outside of common system locations or application bundles. - Upon execution, the vulnerable
aa-executility is tricked into granting namespace-creation capabilities to the attacker's arbitrary binary. - The arbitrary binary executes with elevated privileges, bypassing AppArmor and unprivileged user namespace restrictions, achieving privilege escalation on the system.
Impact
Successful exploitation of CVE-2026-46331 grants attackers privilege escalation on affected Linux systems, particularly Ubuntu. This can lead to a full system compromise, allowing attackers to execute arbitrary code with root privileges. The impact includes unauthorized access to sensitive data, installation of persistent backdoors, modification of system configurations, or deployment of additional malicious payloads such as ransomware or cryptocurrency miners. Organizations using vulnerable Linux distributions could face significant operational disruption and data loss.
Recommendation
- Patch CVE-2026-46331 on all affected Ubuntu systems immediately to prevent privilege escalation.
- Deploy the
Detects CVE-2026-46331 Exploitation - Linux AppArmor Bypass via aa-execSigma rule to your SIEM for early detection of exploitation attempts. - Enable Sysmon for Linux EventID 1 to ensure process creation events are collected, which is essential for activating the detection rule.
Detection coverage 1
Detects CVE-2026-46331 Exploitation - Linux AppArmor Bypass via aa-exec
highDetects attempts to bypass AppArmor and unprivileged user namespace restrictions on Linux systems by abusing the aa-exec utility. This rule specifically flags the execution of 'aa-exec' with '-p' and '--' arguments targeting 'trinity', 'chrome', or 'flatpak' AppArmor profiles, when the 'aa-exec' binary itself is executed from a non-standard or unexpected path not covered by known legitimate application bundle directories.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
3
url
| Type | Value |
|---|---|
| url | https://github.com/sgkdev/packet_edit_meme |
| url | https://tuxcare.com/blog/pedit-cow-cve/ |
| url | https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1068/linux_pedit/sysmon_linux.log |