accountsservice: shell injection via attacker-controlled ~/.pam_environment in Ubuntu language helper scripts
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 22.07.5-2ubuntu1.6, 23.13.9-2ubuntu6.1, 23.13.9-8ubuntu5.2, 23.13.9-8ubuntu7
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
The Ubuntu-specific language helper scripts (save-to-pam-env, update-langlist) shipped with accountsservice before 23.13.9-8ubuntu7 treat the user-controlled LANGUAGE entry in ~/.pam_environment as trusted input. The value is interpolated unescaped into a GNU sed replacement expression, allowing an attacker to inject a sed 'e' flag and arbitrary shell commands that execute with the privileges of the AccountsService helper process (real UID 0) via the SetLanguage D-Bus method.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- accountsservice
From 22.07.5-2ubuntu1 · fixed in 22.07.5-2ubuntu1.6; From 23.13.9-2ubuntu6 · fixed in 23.13.9-2ubuntu6.1; From 23.13.9-8ubuntu5 · fixed in 23.13.9-8ubuntu5.2; From 23.13.9-8ubuntu6 · fixed in 23.13.9-8ubuntu7