This article is more than 1 year old

Apple tried to patch this security hole in macOS Finder but didn't consider upper and lowercase characters

file:// is blocked? Oh OK, we'll just use File:// or fiLE://...

Apple's macOS Finder application is currently vulnerable to a remote code execution bug, despite an apparent attempt to fix the problem.

A security advisory published Tuesday by the SSD Secure Disclosure program, on behalf of researcher Park Minchan, explains that macOS Finder – which provides a visual interface for interacting with files – is vulnerable to documents with the .inetloc extension.

"[T]hese files can be embedded inside emails which if the user clicks on them will execute the commands embedded inside them without providing a prompt or warning to the user," the advisory says.

The files can also execute commands if downloaded and double-clicked. In theory, Apple's macOS security mechanisms Quarantine – for preventing downloads from launching without user action – and Gatekeeper – to enforce code signing – should prevent such problems.

But when The Register tested the PoC file on macOS Big Sur (version 11.6), it executed without any warning. According to security researcher Patrick Wardle, the PoC code bypasses both of those mechanisms.

Apple's operating system software was affected by a similar flaw (CVE-2009-2811) more than a decade ago with the .fileloc extension in Mac OS X 10.5.8.

The .inetloc file extension appears to date back to around 2004 but isn't well documented. Apple's own developer website doesn't recognize the term. Nonetheless macOS sees such files as Internet locations.

According to the advisory, .inetloc files serve as shortcuts to Internet resources like an RSS feed or a telnet location and may include a server address and possibly login credentials for SSH or telnet sessions. They can be created by typing a URL in a text editor and dragging the text to the macOS Desktop, if the format and drag-and-drop are supported within the app.

Here's what the PoC file, inetloc.inetloc for lack of a better name, looks like. If opened in macOS, it will launch the macOS Calculator app.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>URL</key>
    <string>FiLe:////////////////////////System/Applications/Calculator.app</string>
  </dict>
</plist>

The advisory says Apple told the SSD Disclosure Program that newer versions of macOS, from Big Sur onward, have blocked the file:// prefix with a check in com.apple.generic-internet-location. But Apple's engineers evidently failed to consider upper and lower case variations, so alternative renditions of the file handler like File:// or fIle:// still bypass the check.

"We have notified Apple that FiLe:// (just mangling the value) doesn’t appear to be blocked, but have not received any response from them since the report has been made," the advisory says. "As far as we know, at the moment, the vulnerability has not been patched."

The Register asked Apple for comment knowing it's futile to do so. Our lack of faith has been vindicated by the lack of response. For those keeping score, it's been four months since Apple comms last provided proof of life by responding to a query. ®

More about

TIP US OFF

Send us news


Other stories you might like