Alpine Linux and OpenSSH patch flaw that’s as bad as it can get

ZDNET’s key takeaways

  • An ancient bug is affecting Alpine Linux and a few other Linux distros. 
  • It’s about as bad as it can get.
  • You must patch ASAP, and then restart the patched software.

The perfect nightmare scenario for a Linux server is when all an attacker needs to do is reach the server’s Secure Shell (SSH) port, waltz right in, and take it over. That’s what happened to Alpine Linux, the popular, lightweight Linux server. Adding insult to injury, this happened only days after Alpine Linux dodged a security hole-sized bullet to its GitLab implementation. 

Also: Linux Mint 27 arrives next month, and I like it already: What to expect

How the attack works

As security engineer Gregory Bryant explained in his LinkedIn post:

Most authentication bypasses come from complex logic chains, but yesterday’s Alpine Linux OpenSSH vulnerability (CVE-2026-123158) comes down to a single character: *.”

If you run Alpine Linux (or another musl-based distro) with the default openssh-server package (no Pluggable Authentication Modules (PAM)) and PasswordAuthentication enabled, an attacker can log into password-disabled, or key-only accounts simply by sending a password between 257 and 1024 bytes long.

That’s it. That’s all. 

Alpine Linux isn’t the only operating system that uses musl, a lightweight version of the standard C library (libc). Other operating systems that use musl and are potentially vulnerable include Adélie Linux; Void Linux; Sabotage Linux; OpenWrt, an Android variant,  and the Yocto Project, which is used to build embedded Linux distributions. 

Also: This clever banking scam keeps phishing by faking its own demise

Wind River, which produces the commercial embedded Linux distro, Wind River Linux, is also looking into the issue. A company representative told me, “Wind River takes security seriously. We are actively reviewing the reported vulnerability and assessing its potential impact. We will take appropriate action as needed.”

Behind the scenes, when OpenSSH is built without PAM, it verifies passwords by hashing the password attempt using the C library’s crypt() function. It then compares the result to the account’s stored password field. So far, so good.

But when a key is longer than 256 bytes, musl’s crypt() function returns the string * as an error indicator. That is also what the password field holds for any account with no password, such as a key-only account. Thus, the “hash” matches and the login succeeds, and the attacker walks in. 

Also: The new Cutefish Linux distro might be the best MacOS clone around

To exploit it, an attacker only needs the name of such an account. The attacker also needs at least one other account on the machine with a 5 or 6 password hash, and then to send a password of 257 to 1,024 bytes. According to Alpine, one user with a password is enough to make every passwordless account accessible.

In Linux systems that use glibc’s crypt(), which is almost all of them, the same attempt would return NULL on error, which sshd already rejects, so Debian, Ubuntu, Fedora, etc., aren’t affected. 

According to *sshole, the group that uncovered the problem, this is a side effect that has been hiding since 2016.

Who’s exposed

Alpine said every release it checked is affected: 3.21 through 3.24, edge, and the older 3.16 to 3.20 branches. Exposure requires the following:

  • The openssh-server package, which is built without PAM, or openssh-server-pam with UsePAM no.
  • PasswordAuthentication set to yes, which is the OpenSSH default.
  • An account with * as its password field, and another account with a 5 or 6 hash.

Root is not directly exposed in most cases. It has shipped as root:* in the base image since about Alpine 3.16, but OpenSSH’s default PermitRootLogin prohibit-password blocks it. Another account that can become root, for example through doas, still gives an attacker a route to root.

Alpine singled out its official tiny-cloud images, versions 3.18.11 through 3.24.3, as especially vulnerable. These ship with an alpine user with a * password field and passwordless doas. They are safe on first boot but become exploitable once any 6 hash exists on the machine. That can happen when an administrator sets a console password or when user data adds a user with a hashed password, which means, essentially, all of them. 

Alpine said these are not affected:

  • Containers that do not run sshd.
  • Systems with password authentication disabled.
  • Systems using openssh-server-pam with UsePAM yes.
  • Locked accounts with! in the password field.
  • Cloud images configured through cloud-init, which writes PasswordAuthentication no.

The fix

Alpine released 3.21.10, 3.22.8, 3.23.8 and 3.24.4 on Thursday, with the OpenSSH fix among the security changes. It also published fixed packages for each release back to 3.16. Alpine 3.21 reached end of support on Nov. 1.

The just-released OpenSSH 10.6p2 avoids the problem in sshd. Alpine’s stable branches carry a patch for the same problem. You should run apk upgrade -U -a and then restart the daemon with rc-service sshd restart. Alpine stressed that upgrading the package does not replace the running daemon. Anyone who cannot update should set PasswordAuthentication no and restart sshd, after confirming that key login works.

Also: Maze Linux is the best security-focused distro I’ve ever tested

To check for an attack, Alpine told administrators to search /var/log/messages for “Accepted password for” lines that name an account with no password. It also advised reviewing dedicated OpenBSD application subexecutor (doas) use and recently created users, files, and authorized keys. “If you cannot rule out a login, treat the machine as compromised.” Just what you wanted for your weekend, I know, but here we are. 

Please enable JavaScript to view the comments powered by Disqus.

Don’t miss these tips!

We don’t spam! Read more in our privacy policy

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Hot this week

What are the animals in your home learning from each other?

LEARNING FROM EACH OTHER Leaf, Sunshine, and Cuddles The animals who...

A tiny squeeze dramatically changes the magnetism of exotic materials

Scientists at the Department of Energy's Oak Ridge National...

AI Is Thriving at Capital One

If one were making a list of the companies...

The Biggest Snowman Ever Activities for Special Education

This post contains Amazon affiliate links. As an Amazon...

Topics

Related Articles

Popular Categories

News Feed

He went from washing lab equipment for $10 an hour to leading a $30 billion healthcare company. His advice to Gen Z: Raise your...

The road to the corner office doesn’t always start with an Ivy League degree or prestigious internship. For Jake Leach, it started working as...

Gardeners’ World star Monty Don is hailed the ‘best presenter on TV’ as he says he is ‘deeply moved’ by the emotional outpouring to...

Gardeners' World star Monty Don has been hailed as the 'best presenter on TV' as he said that he was 'deeply moved' by the...

Dina Broadhurst flaunts her new boob job in low-cut top after celebrating her 51st birthday by going under the knife

Dina Broadhurst showed off the results of her recent breast augmentation on Friday when she shared a selfie of herself in a low-cut tank...

George and Amal Clooney prove they’re more loved-up than ever as they share a steamy smooch on NYC date night

The human rights attorney, 48, wore a camel-colored suede Gucci coat over an ivory shift dress while out with the Oscar winner, 65.

Jessica Simpson’s sexual awakening with new Nashville boytoy revealed: Self-professed cougar’s ‘yes ma’am’ demands and their naughty nicknames for each other

Just over a year ago, months after her split, Jessica Simpson made no secret of her cougar ambitions, cooing on the red carpet: 'I...

Harry Potter star Bonnie Wright reveals her newborn son Aster has been hospitalised six times since his birth as he’s treated for a condition...

Harry Potter star Bonnie Wright has revealed her newborn son Aster has been hospitalised six times since he was born five weeks ago. 

Country superstar Zach Bryan says he gives his Navy commanding officer a piece of his recording royalties

The Grammy-winning artist, 30, was a member of the U.S. Navy from 2013-2021.

A ‘geologic freak’ called the Smackover may end America’s lithium dependence on China, and Big Oil is already there

Global lithium demand has jumped more than 400% just this decade, to over 1.5 million metric tons per year. By 2035, that demand could...

Gardeners’ World viewers in tears as Monty Don presents his final episode after stepping down from BBC show following 23 years at the helm

Gardeners' World fans were left in tears as they tuned into Monty Don's final ever episode on Friday night. 

The Jimenez Program: How Catholic Charities of New York Helps New American Military Service Members, Veterans, and Their Families

In May 2007, an attack on a U.S. Army unit in Iraq that resulted in the kidnapping of three American soldiers shocked the nation,...

Motley Crue frontman Vince Neil’s, 65, girlfriend Rain Hannah Andreani, 45, allegedly tried to kick rocker in testicles before arrest

Motley Crue frontman Vince Neil's girlfriend Rain Hannah Andreani allegedly tried to kick the rocker in the testicles before her arrest.

This clever tool fixes the biggest blind spot of Google Photos

What I’m about to tell you has a bit of a Matrix edge to it, I realize, but hear me out: Some of my...

Sequoia shutting down its Scouts program marks the end of an era

Sequoia this week announced a broad overhaul in a memo posted to X, a move that includes closing its London office and shutting down...

From the front row to the hot seat — what the midterms mean for Big Tech

Right before the midterm elections, OpenAI hired Jessica Schumer, daughter of Democratic Sen. Chuck Schumer. The company also said it would start calling its...

Early-00s MTV reality star Bam Margera arrives in Sydney after he was ‘basically pronounced dead’ at the hospital following multiple seizures and a blood...

An early 2000s reality TV star touched down in Australia on Wednesday for the first time in 13 years for a live tour.

Khloe Kardashian’s ex Lamar Odom reveals his five-figure OnlyFans earnings after just eight days on the platform

Khloe Kardashian's ex Lamar Odom revealed that he has raked in a five-figure sum after only eight days of joining OnlyFans.

Ellen DeGeneres’ longtime producer Matthew Wright’s cause of death revealed… one week after his sudden passing

Ellen DeGeneres' longtime producer Matthew Wright's cause of death has been revealed following his sudden passing at age 52.

Crusoe sells troubled Wyoming data center project to Google

Crusoe, an eight-year-old, Denver-based data center developer recently valued at $30.9 billion, confirmed Friday it has sold an unfinished data center project in southeastern...

‘The Remarried Empress’ Becomes Most-Viewed Local Original Premiere Ever on Disney+ and Hulu

Korean fantasy romance “The Remarried Empress” has set a new high for Disney+ and Hulu. Based on views across the three days after its...

CJ Group’s Miky Lee Hailed as ‘Godmother of K-Culture’ as She Receives Asian Hall of Fame Lifetime Achievement Medal

Miky Lee, vice chair of Korea’s CJ Group, was handed the Asian Hall of Fame’s Centennial Medal of Lifetime Achievement in Los Angeles. K-pop...

Popular articles

He went from washing lab equipment for $10 an hour to leading a $30 billion healthcare company. His advice to Gen Z: Raise your...

The road to the corner office doesn’t always start with an Ivy League degree or prestigious internship. For Jake Leach, it started working as...

Gardeners’ World star Monty Don is hailed the ‘best presenter on TV’ as he says he is ‘deeply moved’ by the emotional outpouring to...

Gardeners' World star Monty Don has been hailed as the 'best presenter on TV' as he said that he was 'deeply moved' by the...

Dina Broadhurst flaunts her new boob job in low-cut top after celebrating her 51st birthday by going under the knife

Dina Broadhurst showed off the results of her recent breast augmentation on Friday when she shared a selfie of herself in a low-cut tank...

George and Amal Clooney prove they’re more loved-up than ever as they share a steamy smooch on NYC date night

The human rights attorney, 48, wore a camel-colored suede Gucci coat over an ivory shift dress while out with the Oscar winner, 65.

Jessica Simpson’s sexual awakening with new Nashville boytoy revealed: Self-professed cougar’s ‘yes ma’am’ demands and their naughty nicknames for each other

Just over a year ago, months after her split, Jessica Simpson made no secret of her cougar ambitions, cooing on the red carpet: 'I...

Harry Potter star Bonnie Wright reveals her newborn son Aster has been hospitalised six times since his birth as he’s treated for a condition...

Harry Potter star Bonnie Wright has revealed her newborn son Aster has been hospitalised six times since he was born five weeks ago. 

Country superstar Zach Bryan says he gives his Navy commanding officer a piece of his recording royalties

The Grammy-winning artist, 30, was a member of the U.S. Navy from 2013-2021.

A ‘geologic freak’ called the Smackover may end America’s lithium dependence on China, and Big Oil is already there

Global lithium demand has jumped more than 400% just this decade, to over 1.5 million metric tons per year. By 2035, that demand could...

Gardeners’ World viewers in tears as Monty Don presents his final episode after stepping down from BBC show following 23 years at the helm

Gardeners' World fans were left in tears as they tuned into Monty Don's final ever episode on Friday night. 

The Jimenez Program: How Catholic Charities of New York Helps New American Military Service Members, Veterans, and Their Families

In May 2007, an attack on a U.S. Army unit in Iraq that resulted in the kidnapping of three American soldiers shocked the nation,...

Motley Crue frontman Vince Neil’s, 65, girlfriend Rain Hannah Andreani, 45, allegedly tried to kick rocker in testicles before arrest

Motley Crue frontman Vince Neil's girlfriend Rain Hannah Andreani allegedly tried to kick the rocker in the testicles before her arrest.

This clever tool fixes the biggest blind spot of Google Photos

What I’m about to tell you has a bit of a Matrix edge to it, I realize, but hear me out: Some of my...

Sequoia shutting down its Scouts program marks the end of an era

Sequoia this week announced a broad overhaul in a memo posted to X, a move that includes closing its London office and shutting down...

From the front row to the hot seat — what the midterms mean for Big Tech

Right before the midterm elections, OpenAI hired Jessica Schumer, daughter of Democratic Sen. Chuck Schumer. The company also said it would start calling its...

Early-00s MTV reality star Bam Margera arrives in Sydney after he was ‘basically pronounced dead’ at the hospital following multiple seizures and a blood...

An early 2000s reality TV star touched down in Australia on Wednesday for the first time in 13 years for a live tour.

Khloe Kardashian’s ex Lamar Odom reveals his five-figure OnlyFans earnings after just eight days on the platform

Khloe Kardashian's ex Lamar Odom revealed that he has raked in a five-figure sum after only eight days of joining OnlyFans.

Ellen DeGeneres’ longtime producer Matthew Wright’s cause of death revealed… one week after his sudden passing

Ellen DeGeneres' longtime producer Matthew Wright's cause of death has been revealed following his sudden passing at age 52.

Crusoe sells troubled Wyoming data center project to Google

Crusoe, an eight-year-old, Denver-based data center developer recently valued at $30.9 billion, confirmed Friday it has sold an unfinished data center project in southeastern...

‘The Remarried Empress’ Becomes Most-Viewed Local Original Premiere Ever on Disney+ and Hulu

Korean fantasy romance “The Remarried Empress” has set a new high for Disney+ and Hulu. Based on views across the three days after its...

CJ Group’s Miky Lee Hailed as ‘Godmother of K-Culture’ as She Receives Asian Hall of Fame Lifetime Achievement Medal

Miky Lee, vice chair of Korea’s CJ Group, was handed the Asian Hall of Fame’s Centennial Medal of Lifetime Achievement in Los Angeles. K-pop...