It turns out that cyber-threat actors can do quite a bit of damage with nothing more than an email address.

New research from Aikido Security published today examines how a GitLab incoming email address acts as a highly privileged access token that grants broad user rights to an organization’s public and private projects. GitLab automatically assigns each user of the DevOps platform a private email address to create issues in their software projects; if a user emails the address, a new issue will appear in a project authored by that user.

Creating project issues via emails sent to automated unique addresses is not an uncommon capability, Aikido noted in the report. For example, project management platforms such as Trello, Todoist, and Monday.com have similar features.

But GitLab email addresses each contain a non-expiring token that provides broad access to an organization’s resources — and not just the project in which an individual user is working. And if that address itself is publicly exposed, an attacker could abuse it for supply chain attacks without needing actual access to the account.

Related:Unsloth Studio Flaw Turns Routine Model Inspection Into Code Execution

“Any mailbox on the internet can send to that address, and GitLab processes the message as the token’s owner,” the report stated. “If you have the address, you have both authentication and authorization.”

Aikido’s research team argues that many GitLab users are likely unaware of the risks associated with these addresses, shown by the number of intentionally exposed addresses on the public Internet.

What’s Your GitLab Address?

Aikido researcher Joe Leon tells Dark Reading that what started as a simple feature on GitLab for creating project issues has expanded over the years to include more functionality, such as sending merge requests and patch files, with privileged access. And while the capabilities are documented, Leon says the risks are understated, especially in the GitLab user interface (UI).

“It wasn’t communicated clearly that there’s something sensitive in there that not only can create issues but push code. And in pushing code, it can potentially push code to main [the main branch] or execute a CI/CD job,” he says.

GitLab’s UI describes the email address as a tool to add work items like issues to a particular project and specifically states that “It cannot be used to access any other data.” But that is demonstrably false, according to Aikido.

“The credential that’s embedded in the address can be reused across all public and private projects,” Leon says.

Leon found that the email addresses contain what’s called a glimt- (GitLab Incoming Mail Token) prefix string, and that each user’s token string is the same for all public and private projects to which they have access. If an email address for a public project is exposed, an attacker could modify the project path slug and the project ID in the email to reach other private projects (Aikido’s report noted that IDs are guessable but an attacker would need a project name to be leaked).

Related:Chrome Store Hosts ‘Poper Blocker’ Spyware Downloaded by Millions

“They present it as an email address to create an issue in a particular project. And if you’re working on a public project, you can distribute it; that makes sense,” Leon says. “But I didn’t realize that [with] the credential, with just adjusting the email address, anybody could push code to my private projects too. That blew my mind.”

Additionally, Leon found that he could bypass IP address restrictions with GitLab email addresses. He restricted a private project to a single, random IP address that he didn’t own. GitLab’s restriction prevented him from cloning the project or accessing it via a Web browser — but email messages with merge requests broke through that security boundary.

Exposed GitLab Email Addresses Pose Significant Risk

As part of the research project, Leon conducted a “a very non-exhaustive search” on the Internet that spanned a couple of hours, during which he easily found a dozen incoming email addresses that had been exposed intentionally in ReadMe and support files. A few of the exposed addresses belong to popular open source projects, Leon says.

Related:‘Salesbleed’ Exploits Salesforce Agents to Enable Slack Phishing

“I’m sure there are many more out there,” he says. “This was the low-hanging fruit.”

Leon also says it could be difficult to determine if an attacker had abused an incoming email address to, for example, poison a project with malicious code via a merge request. “It’s not obvious that it was done via email,” he adds. “You’d need access to GitLab’s servers, assuming they collect this data.”

Aikido reported its findings to GitLab through HackerOne in May, though GitLab closed the report as intended behavior. The cybersecurity vendor then followed up in June with a confidential issue on the GitLab repository. GitLab eventually changed its UI to reflect that the email address can be used for merge requests and removed the statement “It cannot be used to access any other data.”

GitLab also updated its documentation to inform users that the email addresses are not subject to IP address restrictions.

Leon says the best mitigation he’d like to see is a requirement that the sender address matches the one on the GitLab account; this would create a significant hurdle for attacks, as threat actors would need to compromise the user’s email account rather than just relying on the GitLab address.

“That basically removes the vast majority of the problem here,” he says.

Leon says GitLab is considering this change.

Dark Reading contacted GitLab for comment, but the company did not respond at press time.

In the meantime, Aikido recommended that organizations reduce their attack surfaces by preemptively rotating the access tokens in their GitLab email addresses, and scanning for these addresses in their development environments and repositories like any other secrets.





Source link

#

Comments are closed