OpenSSH/musl Password Authentication Bypass Vulnerability (CVE-2026-123158) Advisory

Overview

Recently, NSFOCUS CERT monitored that OpenSSH released a security update fixing the OpenSSH/musl password authentication bypass vulnerability (CVE-2026-123158). Because crypt() in musl libc returns “*” upon failure, when the target account’s password field is “*” and other accounts using password hashes exist on the system while SSH password authentication is enabled, an unauthenticated attacker can submit an excessively long password. This causes the error return value of musl crypt() to falsely match the target account’s password field, thereby bypassing password authentication and logging into the target account. If the account has sudo/doas privileges, the attacker can further gain root privileges on the system. The CVSS score is 8.1. Vulnerability details and PoCs are currently public, and affected users are advised to take defensive measures as soon as possible.

OpenSSH is a free and open-source implementation of the SSH (Secure Shell) protocol, providing components such as sshd, ssh, and sftp, and is widely used for remote login, file transfer, and secure tunneling. musl libc is a lightweight C standard library designed for Linux systems, commonly found in environments such as Alpine Linux.

NSFOCUS has successfully reproduced this vulnerability:

Reference Link: https://www.openssh.org/txt/release-10.6p2

Scope of Impact

Affected version

  • 7.3p1 <= OpenSSH < 10.6p2

Affects Linux systems using musl libc without PAM enabled for password authentication, with a primary focus on Alpine Linux as well as qualifying OpenWrt, Buildroot, Yocto systems, Docker images, and containers.

Unaffected version

  • OpenSSH >= 10.6p2

Vulnerability Detection

Manual Detection

Users can determine whether their current system is within the affected scope by checking the OpenSSH version, C runtime library type, and relevant configurations:

Check the OpenSSH version command:

ssh -V

Check if the system uses musl libc:

ldd /usr/sbin/sshd

Check SSH configuration:

*Check the main configuration file:
grep -iE ‘PasswordAuthentication|UsePAM’ /etc/ssh/sshd_config
*Check the sub-configuration directory (if any):
grep -iE ‘PasswordAuthentication|UsePAM’ /etc/ssh/sshd_config.d/* 2>/dev/null

If the current version is within the affected range, PasswordAuthentication is set to yes, and PAM is not enabled on the system, security risks may exist.

Mitigation

Official Upgrade

The vendor has released a new version to fix this vulnerability. Affected users should upgrade as soon as possible for protection.

Other Mitigation Measures

If business operations permit, affected users can apply the following temporary mitigations:

  • Disable SSH password authentication by setting PasswordAuthentication no in /etc/ssh/sshd_config and restarting sshd.
  • Set PermitRootLogin to prohibit-password or no.

Statement

This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.

About NSFOCUS

NSFOCUS, a pioneering leader in cybersecurity, is dedicated to safeguarding telecommunications, Internet service providers, hosting providers, and enterprises from sophisticated cyberattacks.

Founded in 2000, NSFOCUS operates globally with over 3000 employees at two headquarters in Beijing, China, and Santa Clara, CA, USA, and over 50 offices worldwide. It has a proven track record of protecting over 25% of the Fortune Global 500 companies, including four of the five largest banks and six of the world’s top ten telecommunications companies.

Leveraging technical prowess and innovation, NSFOCUS delivers a comprehensive suite of security solutions, including the Intelligent Security Operations Platform (ISOP) for modern SOC, DDoS Protection, Continuous Threat Exposure Management (CTEM) Service and Web Application and API Protection (WAAP). All the solutions and services are augmented by the Security Large Language Model (SecLLM), ML, patented algorithms and other cutting-edge research achievements developed by NSFOCUS.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

NSFOCUS
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.