CVE-2023-3297
High · 7.8CVSS
7.8
EPSS
0.3%
Published
Sep 1, 2023
CISA due date
—
Cloudanix analysis
A flaw in the software that manages user accounts on Ubuntu computers lets someone already logged in locally take complete control of the machine.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free condition in accountsservice triggered when an unprivileged local process sends a crafted D-Bus message to the accounts-daemon, allowing the freed memory to be reused for arbitrary code execution or privilege escalation.
Why it matters to the business
Local attackers on affected Ubuntu systems can obtain full administrative control, resulting in data theft, ransomware deployment, or persistent unauthorized access across the fleet.
How an attack unfolds
An attacker with a local shell crafts and sends a malicious D-Bus message to accounts-daemon; the message triggers a use-after-free that the attacker then leverages to corrupt memory and execute code with elevated privileges.
How to fix it
Upgrade accountsservice to a version containing the fix once released by Canonical; until then restrict local user accounts and monitor D-Bus activity.
How to confirm the fix worked
Inspect the installed accountsservice package version against Canonical advisories and test that accounts-daemon no longer crashes or exhibits memory errors when receiving the previously triggering D-Bus messages.
Typical attack path
- Obtain local shell access
- Send crafted D-Bus message to accounts-daemon
- Trigger use-after-free memory corruption
- Achieve arbitrary code execution or root privileges
How to detect it
Review system and audit logs for D-Bus messages directed at accounts-daemon from unprivileged UIDs, unexpected crashes of accounts-daemon, or subsequent privilege-escalation events such as new root processes.
What your security team should do
- Prioritize patching accountsservice as soon as updates become available
- Limit local interactive accounts to the minimum required users
- Enable D-Bus auditing and forward logs to central SIEM for anomaly detection
The record
In Ubuntu's accountsservice an unprivileged local attacker can trigger a use-after-free vulnerability in accountsservice by sending a D-Bus message to the accounts-daemon process.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:20.04:LTS | accountsservice | 0 | 0.6.55-0ubuntu12~20.04.6 |
| Ubuntu:22.04:LTS | accountsservice | 0 | 22.07.5-2ubuntu1.4 |
| Ubuntu:Pro:14.04:LTS | accountsservice | 0 | 0.6.35-0ubuntu7.3+esm3 |
| Ubuntu:Pro:16.04:LTS | accountsservice | 0 | 0.6.40-2ubuntu11.6+esm1 |
| Ubuntu:Pro:18.04:LTS | accountsservice | 0 | 0.6.45-1ubuntu1.3+esm1 |
Related vulnerabilities
- CVE-2021-3939 Ubuntu-specific modifications to accountsservice (in patch file… Also affects accountsservice
- CVE-2022-1804 accountsservice no longer drops permissions when writing .pam_environment Also affects accountsservice
- CVE-2026-109618 PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort… CWE-416
- CVE-2026-109619 PHP has various global state that temporarily points into request memory. CWE-416
- CVE-2026-112402 Pillow is a Python imaging library. CWE-416
- CVE-2026-112396 Pillow is a Python imaging library. CWE-416
- CVE-2025-55654 A use-after-free in the gf_filter_pid_get_packet function (filter_core/filter_pid.c) of… CWE-416
- CVE-2026-17591 A flaw was found in libarchive. CWE-416