GitLab fixes critical flaw that lets users log in as admins

The fixes are available for all supported versions of GitLab Community Edition and GitLab Enterprise Edition

GitLab patched multiple privilege escalation flaws, cross-site scripting bugs, and information disclosure vulnerabilities in both the open source and commercial versions of its self-hosted system for managing Git repositories. The most critical is a serious authentication flaw that enabled users to log in as other users.

The critical vulnerability was in GitLab's "impersonate" feature (CVE-2016-4340), which was introduced in GitLab 8.2 to let an administrator simulate being logged in as another user. However, the feature was not properly secured, so any authenticated user could log in as another user, even as administrators, GitLab said in its security advisory. The issue was discovered as part of an internal code review.

"I think this the worst vulnerability we've had to date," Douwe Maan, development lead at GitLab, wrote on the internal issue tracker.

Versions 8.7, 8.6.0 through 8.6.7, 8.5.0 through 8.5.11, 8.4.0 through 8.4.9, 8.3.0 through 8.3.8, and 8.2.0 through 8.2.4 for the CE (Community Edition) and EE (Enterprise Edition) are affected. All installations should be upgraded to versions 8.7.1, 8.6.8, 8.5.12, 8.4.10, 8.3.9, and 8.2.5 as soon as possible.

Administrators who can't upgrade their server installations right away can use a workaround to turn off impersonation. There are recommendations for securing installations using the bundled Nginix Web server, an external Web server, the HAProxy configuration, or the patch.

A privilege escalation flaw in the Notes API would allow attackers to send a specially-crafted request to the GitLab API and post notes on merge requests, snippets, and issues without permission. The attacker would be able to craft a request from one project to add notes and other objects to the victim's private project.

"This vulnerability can be used to scare people because it looks like the unauthorized user has access to the issue, snippet, or merge request," wrote GitLab developer Robert Speicher.

The other privilege escalation flaw in the project webhook API lets attackers delete and read webhooks for all projects on a GitLab instance. Attackers can send API requests to the targeted project from a project they own to access sub-resources. "This is a bad vulnerability because these webhooks contain private (API) tokens most of the time," Speicher noted.

Among the four XSS bugs fixed, one could potentially enable attackers to execute arbitrary JavaScript and steal the victim's API token in order to take over the account. The API token can be used to access the user's projects, perform actions as the user, and gain access to potential confidential information stored in the project. The four information disclosure flaws also exposed private project information, including one in which private snippets posted to public projects were leaked through the GitLab API.

"It seems that private snippets may be used to hold private (API) tokens or similar confidential information. This can seriously damage to a company depending on what kind of information is shared," according to the description of the flaw.  

Users with projects on don't have to worry as the company takes care of maintaining the platform. For administrators managing GitLab CE or GitLab EE installed on their own hardware, GitLab advises updating to the latest versions immediately, especially because the impersonation flaw is very serious.

Join the CSO newsletter!

Error: Please check your email address.

More about

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Fahmida Y. Rashid

Latest Videos

  • 150x50

    CSO Webinar: Will your data protection strategy be enough when disaster strikes?

    Speakers: - Paul O’Connor, Engagement leader - Performance Audit Group, Victorian Auditor-General’s Office (VAGO) - Nigel Phair, Managing Director, Centre for Internet Safety - Joshua Stenhouse, Technical Evangelist, Zerto - Anthony Caruana, CSO MC & Moderator

    Play Video

  • 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

More videos

Blog Posts

Market Place