The macOS root bug

On 28 November 2017 I asked Apple Support, on Twitter, whether it knew that anyone could log in as “root” on macOS High Sierra with an empty password. Within hours tech news sites had picked it up, by the next day it was in newspapers from the United States to China, and that same day Apple shipped a fix and apologised. This is the story as I told it then, and what I learned from it.

At a glance

Bug
CVE-2017-13872, a logic error in validating credentials[1][2]
Affected
macOS High Sierra 10.13 and 10.13.1[2]
Severity
8.1 of 10, High (CVSS 3.0)[1]
The tweet
28 November 2017, 21:38 in Istanbul[3]
Fixed
Security Update 2017-001, 29 November 2017[2]
Noticed by
The infrastructure team of the company I worked for, not me; it had been on Apple's forums since 13 November[4]

The tweet

Dear @AppleSupport, we noticed a *HUGE* security issue at MacOS High Sierra. Anyone can login as "root" with empty password after clicking on login button several times. Are you aware of it @Apple?

@lemiorhan, 28 November 2017

Nine minutes later I posted the steps: open System Preferences, go to Users & Groups and click the lock to make changes, then type “root” with no password, and try it several times. “Result is unbelievable!”[5]

How we noticed it

I am not the one who discovered the bug, and I wrote so the day after the tweet.[4] About a week before it, the infrastructure staff at the company I worked for stumbled on the issue while helping one of my colleagues get back into his local admin account, and they used the flaw to recover it. On 23 November they reported it to Apple. Searching online, they found it already mentioned in a few places, even on Apple's Developer Forums on 13 November. The issue had been revealed, but Apple had not noticed yet.[4]

On 28 November the staff told me they had to set a root password on my Mac so that it would not be open to it. I saw the issue with my own eyes and could not believe it.[4] “They tried the same thing at my machine and worked. It scared us a lot,” I told Motherboard that night.[6] The issue was serious, it had already been mentioned in public forums weeks before, and I thought I had to ask Apple whether it was aware of it. So I asked on Twitter.[4]

I am neither a hacker nor a security specialist. I had no intention to harm Apple or its users; I wanted to warn Apple that there was a serious security issue in High Sierra, so that it would fix it.[4]

Apple's answer

Apple Support replied to my tweet that evening and asked me to send a direct message with my Mac model and macOS version.[7] The same night Apple told the press it was working on a software update, and that setting a root password would block unauthorised access until then.[8]

The next day, 29 November, Apple released Security Update 2017-001. Its notes describe the flaw in one sentence: “A logic error existed in the validation of credentials. This was addressed with improved credential validation.”[2] On a Mac upgraded from 10.13 to 10.13.1 the fix needed a reboot, or the bug came back.[2][10] Apple also apologised:

Security is a top priority for every Apple product, and regrettably we stumbled with this release of macOS. … We greatly regret this error and we apologize to all Mac users, both for releasing with this vulnerability and for the concern it has caused. Our customers deserve better.

Apple, in a statement to MacRumors, 29 November 2017[9]

Going public

The criticism came as fast as the coverage. I should have told Apple privately, the argument went, and given it time to patch the bug before anyone heard of it.[7][11]

Four months later I took that argument on stage at Women Techmakers Istanbul, in a talk called “Irresponsible Disclosure: Short Handbook of an Ethical Developer”.[12] The rule I give there is the one my critics gave: it does not matter whether a company runs a bug bounty program; report a vulnerability to it privately, through private channels, and keep it confidential. Then comes the turn: we had already done exactly that. Our infrastructure team had contacted Apple several times. One of those messages went out on 23 November, five days before the tweet, and ended: “I don't think you can resolve this issue, therefore I want to talk with someone from security.”[12]

By then a private report was no longer enough. The flaw had been public for two weeks, which meant it could already be on the deep web, and attackers could already be using it to get into machines as root.[12]

When you see the fire spreading uncontrollably, you have to press the fire alarm. Sometimes keeping the issue private causes more problems than making it public.

From “Irresponsible Disclosure”, 2018[12]

The talk puts this inside a longer list, the principles of an ethical developer. On security it reads: we apply secure coding practices, we test the security of our software, we do not keep passwords in clear text, we remove passwords from external files, we protect log files and all internals, and we inform about security vulnerabilities. On social media: we show respect.[12]

Timeline

Newest first. Times are Istanbul time.

  1. Dec 2019

    I tell the story again at TEDx

    TEDxTarsusAmericanCollege

    Bir Gecede Ünlü Eden Elma, in Turkish.

  2. 31 Mar 2018

    Irresponsible Disclosure

    Women Techmakers Istanbul

    The slides are on Speaker Deck.

  3. 29 Nov 2017

    Apple ships Security Update 2017-001 and apologises

    Later that day it starts installing itself on every Mac running 10.13.1.[9]

  4. 29 Nov 2017, 14:27

    I write the story behind the tweet

    Medium

  5. 28 Nov 2017, 23:25

    Apple Support replies and asks for a DM

  6. 28 Nov 2017, 23:15

    The Register writes it up

    Coverage follows through the night, from the US to Germany and Türkiye.

  7. 28 Nov 2017, 21:38

    I tweet to @AppleSupport

  8. 28 Nov 2017

    Our staff set a root password on my Mac

    I see the issue with my own eyes.

  9. 23 Nov 2017

    Our infrastructure team reports the issue to Apple

  10. Before 23 Nov 2017

    Our infrastructure staff stumble on the flaw

    While helping a colleague of mine back into his local admin account.

  11. 13 Nov 2017

    The flaw appears on Apple's Developer Forums

In the press

The story ran in tech news sites and newspapers around the world, and many of them told it with two errors. They wrote that I discovered the bug, and that nobody had told Apple before the tweet. Our staff noticed it, and reported it to Apple five days before I tweeted.[4][12] Apple's own statement said its security engineers became aware of the issue on Tuesday afternoon, the day of the tweet.[9] My name came out in a few new spellings too: Lemi Ergin, Lemi Orhan Ergan, Lemi Orhan Engin and Erign.[7][13][14][10]

Each article below names me or embeds my tweet. Ars Technica and Wired covered the bug as well; both are among the references of its CVE entry.[1]

United States

  1. TechCrunch
    Huge security flaw lets anyone log into a High Sierra Mac

    28 November 2017, with Apple's first statement.

  2. MacRumors
  3. Engadget
  4. Motherboard
    ‘Dumb’ MacOS Bug Allowed Anyone to Get Admin Privileges Without a Password

    28 November 2017, with my own words, sent by direct message.

  5. Fortune
  6. BGR
  7. CSO Online
  8. CNBC
  9. Computerworld
  10. Macworld

United Kingdom and Ireland

  1. The Register
    Pro tip: You can log into macOS High Sierra as root with no password

    28 November 2017, about an hour and a half after the tweet.

  2. The Week
  3. Silicon Republic

Europe and China

  1. heise online
  2. t3n
  3. Le Monde Informatique
  4. Xataka
  5. China Daily

Türkiye

  1. Hürriyet
    Türk yazılımcı açığını buldu, Apple ayağa kalktı!

    29 November 2017, from BBC Türkçe's report, which CNN Türk and Milliyet ran too.

  2. CNN Türk
  3. Milliyet
  4. Habertürk
  5. Sabah
  6. LOG
  7. Gazete Vatan
    Apple’a milyonlardan özür dileten Türk!

    30 November 2017, on Apple's apology.

Told again

  1. Medium, 2017
    The Story Behind “anyone can login as root” Tweet

    Written the day after, to explain how we noticed the issue and why I tweeted.

  2. Talk, 2018
    Irresponsible Disclosure: Short Handbook of an Ethical Developer

    Women Techmakers Istanbul: the ethics of going public, and the principles of an ethical developer.

  3. TEDx, 2019
    Bir Gecede Ünlü Eden Elma

    At TEDxTarsusAmericanCollege, in Turkish: the chain of events of one night, and the apple that made me known overnight.

References

  1. NVD, CVE-2017-13872: description, CVSS score and references
  2. Apple Support, Security Update 2017-001: released 29 November 2017
  3. The tweet, 28 November 2017; the time is read from the tweet's ID
  4. The Story Behind “anyone can login as root” Tweet, Medium, 29 November 2017
  5. The follow-up tweet with the steps, 28 November 2017
  6. Motherboard, 28 November 2017: my answer by direct message
  7. CNBC, 29 November 2017: Apple Support's reply, the criticism, and “Lemi Ergin”
  8. TechCrunch, 28 November 2017: Apple's first statement
  9. MacRumors, 29 November 2017: the fix and Apple's apology in full
  10. Macworld, 1 December 2017: the bug coming back after the upgrade, and “Erign”
  11. iMore, 28 November 2017: the case for telling Apple first
  12. Irresponsible Disclosure: Short Handbook of an Ethical Developer, Women Techmakers Istanbul, 31 March 2018
  13. The Register, 28 November 2017: “Lemi Orhan Ergan”
  14. Habertürk, 29 November 2017: “Lemi Orhan Engin”