CVE-2015-8325
High · 7.8CVSS
7.8
EPSS
0.6%
Published
May 1, 2016
CISA due date
—
Cloudanix analysis
A configuration issue in older login handling software lets someone who already has limited access on a machine take over the entire system by tricking it into loading attacker-chosen code during login.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- Network Service
- Class
- Privilege Escalation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Allows a local user to inject arbitrary environment variables (such as LD_PRELOAD) into the /bin/login process via a crafted .pam_environment file when UseLogin is enabled and PAM is configured to read user home directory files, resulting in privilege escalation to root.
Why it matters to the business
An attacker with existing low-privileged access can obtain full system control, potentially leading to data breaches, service disruption, or persistent unauthorized access in environments using the affected OpenSSH configuration; the issue appears in older GitLab Bitnami packages, increasing exposure for organizations that have not updated those deployments.
How an attack unfolds
An attacker with local shell access creates a malicious .pam_environment file in their home directory containing an LD_PRELOAD variable pointing to a library that executes attacker-controlled code, then triggers a login session through the vulnerable sshd path that invokes /bin/login under PAM, causing the preloaded library to run with elevated privileges.
How to fix it
Upgrade GitLab Bitnami to version 13.10.5 or later, which includes a patched OpenSSH component; disable UseLogin in sshd_config and configure PAM to ignore user .pam_environment files if immediate upgrade is not possible.
How to confirm the fix worked
Confirm the installed OpenSSH version is newer than 7.2p2 and that UseLogin is set to no in sshd_config; verify the GitLab Bitnami package version meets or exceeds 13.10.5 and test that PAM does not load environment files from user home directories.
Typical attack path
- Obtain initial local user account on the target system
- Write a crafted .pam_environment file containing LD_PRELOAD or similar variables
- Initiate an SSH connection or login that invokes the UseLogin code path
- Trigger PAM environment loading which passes the variable to /bin/login
- Execute arbitrary code with root privileges via the preloaded library
How to detect it
Search authentication logs and PAM-related logs for unusual environment variable injections during login sessions; examine user home directories for unexpected .pam_environment files containing LD_PRELOAD or similar variables; review process execution logs for /bin/login spawning with unexpected library loads.
- .pam_environment
- LD_PRELOAD
- UseLogin yes
What your security team should do
- Immediately upgrade all GitLab Bitnami instances to 13.10.5 or newer
- Audit sshd_config across the environment and set UseLogin to no
- Review PAM configuration to prevent reading of user-writable environment files
- Monitor for any remaining systems running OpenSSH 7.2p2 or earlier
The record
The do_setup_env function in session.c in sshd in OpenSSH through 7.2p2, when the UseLogin feature is enabled and PAM is configured to read .pam_environment files in user home directories, allows local users to gain privileges by triggering a crafted environment for the /bin/login program, as demonstrated by an LD_PRELOAD environment variable.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.2 | openssh | 0 | 6.8_p1-r10 |
| Debian:11 | openssh | 0 | 1:7.2p2-3 |
| Debian:12 | openssh | 0 | 1:7.2p2-3 |
| Debian:13 | openssh | 0 | 1:7.2p2-3 |
| Debian:7 | openssh | 0 | 1:6.0p1-4+deb7u4 |
| Debian:8 | openssh | 0 | 1:6.7p1-5+deb8u2 |
| Mageia:5 | openssh | 0 | 6.6p1-5.9.mga5 |
| Red Hat:enterprise_linux:6::client | openssh | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::client | openssh-askpass | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::client | openssh-clients | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::client | openssh-debuginfo | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::client | openssh-ldap | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::client | openssh-server | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::client | pam_ssh_agent_auth | 0 | 0:0.9.3-122.el6 |
| Red Hat:enterprise_linux:6::computenode | openssh | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::computenode | openssh-askpass | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::computenode | openssh-clients | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::computenode | openssh-debuginfo | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::computenode | openssh-ldap | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::computenode | openssh-server | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::computenode | pam_ssh_agent_auth | 0 | 0:0.9.3-122.el6 |
| Red Hat:enterprise_linux:6::server | openssh | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::server | openssh-askpass | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::server | openssh-clients | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::server | openssh-debuginfo | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::server | openssh-ldap | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::server | openssh-server | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::server | pam_ssh_agent_auth | 0 | 0:0.9.3-122.el6 |
| Red Hat:enterprise_linux:6::workstation | openssh | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::workstation | openssh-askpass | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::workstation | openssh-clients | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::workstation | openssh-debuginfo | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::workstation | openssh-ldap | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::workstation | openssh-server | 0 | 0:5.3p1-122.el6 |
| Red Hat:enterprise_linux:6::workstation | pam_ssh_agent_auth | 0 | 0:0.9.3-122.el6 |
| Red Hat:enterprise_linux:7::client | openssh | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | openssh-askpass | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | openssh-clients | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | openssh-debuginfo | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | openssh-keycat | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | openssh-ldap | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | openssh-server | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | openssh-server-sysvinit | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::client | pam_ssh_agent_auth | 0 | 0:0.9.3-9.31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh-askpass | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh-clients | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh-debuginfo | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh-keycat | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh-ldap | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh-server | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | openssh-server-sysvinit | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::computenode | pam_ssh_agent_auth | 0 | 0:0.9.3-9.31.el7 |
| Red Hat:enterprise_linux:7::server | openssh | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | openssh-askpass | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | openssh-clients | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | openssh-debuginfo | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | openssh-keycat | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | openssh-ldap | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | openssh-server | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | openssh-server-sysvinit | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::server | pam_ssh_agent_auth | 0 | 0:0.9.3-9.31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh-askpass | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh-clients | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh-debuginfo | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh-keycat | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh-ldap | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh-server | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | openssh-server-sysvinit | 0 | 0:6.6.1p1-31.el7 |
| Red Hat:enterprise_linux:7::workstation | pam_ssh_agent_auth | 0 | 0:0.9.3-9.31.el7 |
| SUSE:Linux Enterprise Desktop 12 | openssh | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Desktop 12 | openssh-askpass-gnome | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | openssh | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | openssh | 0 | 6.2p2-0.33.2 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | openssh-askpass-gnome | 0 | 6.2p2-0.33.5 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | openssh | 0 | 6.2p2-0.33.2 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | openssh-askpass-gnome | 0 | 6.2p2-0.33.5 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | openssh | 0 | 6.2p2-0.33.2 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | openssh-askpass-gnome | 0 | 6.2p2-0.33.5 |
| SUSE:Linux Enterprise Server 11 SP4 | openssh | 0 | 6.6p1-21.1 |
| SUSE:Linux Enterprise Server 11 SP4 | openssh-askpass-gnome | 0 | 6.6p1-21.3 |
| SUSE:Linux Enterprise Server 11-SECURITY | openssh-openssl1 | 0 | 6.6p1-15.1 |
| SUSE:Linux Enterprise Server 12 | openssh | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Server 12 | openssh-askpass-gnome | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Server 12 SP1 | openssh | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Server 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | openssh | 0 | 6.6p1-21.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | openssh-askpass-gnome | 0 | 6.6p1-21.3 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | openssh | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | openssh-askpass-gnome | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | openssh | 0 | 6.6p1-42.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | openssh-askpass-gnome | 0 | 6.6p1-42.1 |
| SUSE:Manager 2.1 | openssh | 0 | 6.2p2-0.33.2 |
| SUSE:Manager 2.1 | openssh-askpass-gnome | 0 | 6.2p2-0.33.5 |
| SUSE:Manager Proxy 2.1 | openssh | 0 | 6.2p2-0.33.2 |
| SUSE:Manager Proxy 2.1 | openssh-askpass-gnome | 0 | 6.2p2-0.33.5 |
| SUSE:OpenStack Cloud 5 | openssh | 0 | 6.2p2-0.33.2 |
| SUSE:OpenStack Cloud 5 | openssh-askpass-gnome | 0 | 6.2p2-0.33.5 |
| Ubuntu:14.04:LTS | openssh | 0 | 1:6.6p1-2ubuntu2.7 |
| Ubuntu:16.04:LTS | openssh | 0 | 1:7.2p2-3 |
| openSUSE:Tumbleweed | openssh | 0 | 7.2p2-3.1 |
Related vulnerabilities
- CVE-2016-6210 sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing… Also affects openssh
- CVE-2016-6515 The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit… Also affects openssh
- CVE-2016-1907 The ssh_packet_read_poll2 function in packet.c in OpenSSH before 7.1p2 allows remote… Also affects openssh
- CVE-2023-51385 In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host… Also affects openssh
- CVE-2021-41617 sshd in OpenSSH 6.2 through 8.x before 8.8, when certain non-default configurations are… Also affects openssh
- CVE-2016-10708 sshd in OpenSSH before 7.4 allows remote attackers to cause a denial of service (NULL… Also affects openssh
- CVE-2016-1908 The client in OpenSSH before 7.2 mishandles failed cookie generation for untrusted X11… Also affects openssh
- CVE-2016-10009 Untrusted search path vulnerability in ssh-agent.c in ssh-agent in OpenSSH before 7.4… Also affects openssh