Skip to main content

CVE-2019-3842: CWE-285 in The systemd Project systemd

Medium
VulnerabilityCVE-2019-3842cvecve-2019-3842cwe-285
Published: Tue Apr 09 2019 (04/09/2019, 20:25:01 UTC)
Source: CVE Database V5
Vendor/Project: The systemd Project
Product: systemd

Description

In systemd before v242-rc4, it was discovered that pam_systemd does not properly sanitize the environment before using the XDG_SEAT variable. It is possible for an attacker, in some particular configurations, to set a XDG_SEAT environment variable which allows for commands to be checked against polkit policies using the "allow_active" element rather than "allow_any".

AI-Powered Analysis

AILast updated: 07/10/2025, 21:31:35 UTC

Technical Analysis

CVE-2019-3842 is a medium-severity vulnerability affecting systemd versions prior to v242-rc4. The issue lies in the pam_systemd module, which is responsible for integrating systemd with PAM (Pluggable Authentication Modules). Specifically, pam_systemd does not properly sanitize the environment variable XDG_SEAT before using it. This improper sanitization allows an attacker, under certain configurations, to manipulate the XDG_SEAT environment variable to influence how commands are checked against polkit policies. Normally, polkit uses the "allow_any" element for policy checks, but due to this vulnerability, an attacker can cause the system to use the less restrictive "allow_active" element instead. This change potentially lowers the authorization requirements for executing certain commands, enabling privilege escalation or unauthorized actions. The vulnerability is classified under CWE-285 (Improper Authorization), indicating that the system does not correctly enforce access control policies. The CVSS 3.0 base score is 4.5 (medium), reflecting that the attack vector is local (AV:L), requires high attack complexity (AC:H), low privileges (PR:L), no user interaction (UI:N), and impacts confidentiality, integrity, and availability to a limited extent (C:L/I:L/A:L). No known exploits have been reported in the wild, and no official patches are linked in the provided data, but the issue was addressed in systemd v242-rc4 and later versions.

Potential Impact

For European organizations, this vulnerability poses a risk primarily in environments where systemd is deployed with PAM and polkit configured in a way that allows environment variables like XDG_SEAT to be influenced by untrusted users. Since systemd is a core component in many Linux distributions widely used across Europe, including servers, workstations, and embedded devices, exploitation could lead to unauthorized privilege escalation or execution of commands with elevated rights. This could compromise system integrity and confidentiality, potentially allowing attackers to bypass intended access controls. The impact is more significant in multi-user systems, shared hosting environments, or where local user accounts have limited privileges but access to PAM and polkit. However, the requirement for local access and high attack complexity reduces the likelihood of widespread exploitation. Nonetheless, organizations handling sensitive data or critical infrastructure should consider this vulnerability seriously to prevent potential lateral movement or privilege escalation by insiders or attackers with limited access.

Mitigation Recommendations

To mitigate CVE-2019-3842, European organizations should: 1) Upgrade systemd to version v242-rc4 or later, where the vulnerability is fixed. 2) Review and harden PAM and polkit configurations to minimize the risk of environment variable manipulation, including restricting which environment variables are passed and sanitized during authentication. 3) Implement strict user privilege separation and limit local user accounts to reduce the attack surface. 4) Monitor system logs for unusual polkit authorization requests or environment variable anomalies that could indicate exploitation attempts. 5) Employ security tools that detect privilege escalation attempts and anomalous behavior related to PAM and polkit. 6) Conduct regular security audits and penetration testing focused on local privilege escalation vectors. These steps go beyond generic advice by focusing on configuration hardening and monitoring specific to the vulnerability's exploitation path.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
redhat
Date Reserved
2019-01-03T00:00:00.000Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 68487f5d1b0bd07c3938df98

Added to database: 6/10/2025, 6:54:21 PM

Last enriched: 7/10/2025, 9:31:35 PM

Last updated: 7/28/2025, 2:19:40 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats