Sceawere
Vulnerability Detail
CVE-2026-61898UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
AccountsService Language Helper Command Injection
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 7.8
- Creation Date
- 3h ago
- Vendor
- Canonical
- Product
- accountsservice
- Attack Type
- CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
- Vector String
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Complexity
- LOW
Narrative and Response
Description
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.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "7.8",
"pubDate": "2026-08-20T15:17:38.913Z",
"pubdate": "2026-08-20T15:17:38.913Z",
"executiveSummary": "An arbitrary shell command injection vulnerability exists in the Ubuntu-specific language helper scripts (save-to-pam-env, update-langlist) shipped with accountsservice prior to version 23.13.9-8ubuntu7. The vulnerability stems from the improper handling of user-controlled environment configuration data within a GNU sed replacement expression.\nAn authenticated local attacker can exploit this flaw by manipulating the LANGUAGE entry within their user-controlled ~/.pam_environment file and invoking the SetLanguage D-Bus method. Successful exploitation results in the execution of arbitrary shell commands with the elevated privileges of the AccountsService helper process, which operates with a real UID of 0.\nThis vulnerability poses a significant risk to system integrity and confidentiality, allowing local privilege escalation on affected Ubuntu systems. The attack vector requires local access to modify user environment files and interact with the system D-Bus interface, but requires no prior administrative privileges for the initiating user account.",
"technicalDetails": "The root cause of the vulnerability lies in insecure input validation and string interpolation within the Ubuntu-specific language helper scripts, specifically save-to-pam-env and update-langlist, which are components of the accountsservice package prior to version 23.13.9-8ubuntu7.\nDuring the processing of user localization settings via the SetLanguage D-Bus method, the helper scripts read the LANGUAGE entry from the user-controlled ~/.pam_environment file. The application treats this input as trusted data and interpolates the unescaped string directly into a GNU sed replacement expression.\nBecause the input is not properly sanitized or bounded, an attacker can craft a malicious LANGUAGE payload containing specific sed command delimiters and the 'e' flag extension supported by GNU sed. The 'e' flag instructs sed to execute the resulting replacement string as a shell command using the system shell.\nThe step-by-step attack flow proceeds as follows: First, the attacker modifies or creates the ~/.pam_environment file within their home directory, injecting a specially crafted payload into the LANGUAGE variable. Second, the attacker triggers the vulnerability by calling the SetLanguage D-Bus method provided by AccountsService, passing parameters that force the helper scripts to parse the malicious ~/.pam_environment file.\nThird, the vulnerable helper scripts (save-to-pam-env or update-langlist) execute the flawed GNU sed command containing the interpolated user input. Fourth, GNU sed processes the replacement expression, encounters the injected 'e' flag, and evaluates the payload string in a shell context.\nFinally, the arbitrary shell commands embedded in the payload execute with the privileges of the AccountsService helper process. Because the helper process executes with a real UID of 0, the attacker achieves arbitrary code execution with root privileges, leading to complete compromise of the local operating system."
}