Outdated Git version in OS X puts developers at risk

The Git version shipped with Apple's command line developer tools is vulnerable to remote code execution attacks

The OS X command line developer tools include an old version of the Git source code management system that exposes Mac users to remote code execution attacks.

The Git client allows developers to interact with source code repositories. It is not installed by default on Mac OS X, but it is included in the Command Line Tools package for Xcode, Apple's integrated development environment (IDE).

Software developers who create applications for OS X or iOS are likely to use Xcode and to have Apple's Command Line Tools package installed on their Macs. The latest version of this package includes Git version 2.6.4, released in December.

The problem is that Git 2.6.4 has two serious vulnerabilities that were publicly disclosed last month. The flaws, tracked as CVE-2016-2315 and CVE-2016-2324, affect both client and server deployments on Git. On the client side, they could lead to remote code execution when cloning a repository with a large filename or a large number of nested trees.

The vulnerabilities were fixed in Git 2.7.4, released on March 17, but one month later Apple still hasn't released an update to its Command Line Tools package.

Even worse, since the Git binary is installed as a system-level program, on OS X El Capitan (10.11) users can't easily replace or update it themselves, according to systems administration expert Rachel Kroll. That's because Apple's latest OS X version includes System Integrity Protection (SIP), a mechanism that prevents modifying programs in certain protected directories like /usr and /bin, even with root privileges.

"Maybe you want to be clever and protect your users by disabling it until you can figure something else out," Kroll said in a blog post. "Well, sorry. You also can't 'chmod -x' to at least keep it from being used. It will also fail."

Fortunately, there is a workaround, because /usr/bin/git is just a clever link to /Applications/Xcode.app/Contents/Developer/usr/bin, which can be modified. Running "chmod -x" on the latter binary will remove its execution privileges and ensure that no users or programs accidentally run it.

Then you have to wait until Apple releases a patched version as part of a future Command Line Tools package. However, Git is important for development tools and preventing its use could affect workflows.

Apple did not immediately respond to an inquiry about its plans of patching the Git binary that the company distributes.

"If you rely on machines like this, I am truly sorry," Kroll said. "I feel for you."

Join the CSO newsletter!

Error: Please check your email address.

More about AppleKrollMacs

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts