GitLab Email Token Lets Attackers Push Code to Main and Execute CI/CD Jobs
A long-lived GitLab email token allows attackers to push code, create merge requests, and trigger CI/CD pipelines while bypassing IP restrictions.
Overview
GitLab has a security flaw where a long-lived email tokenA short-lived digital pass that a server gives a logged-in user or app embedded in project addresses can be exploitedA piece of code or technique that uses a software flaw to break into or crash a system by attackers. This token allows unauthorized users to push code, create merge requests, and trigger CI/CD pipelinesThe automated pipeline that tests, builds, and deploys software whenever developers push new code using the permissionsThe specific rights granted to an account or app to read, write, or run files and services of the token owner. The issue bypasses IP restrictions because incoming email is explicitly excluded from those controls. The token does not expire and is reused across all projects accessible to the account, including private repositoriesA central storage place where a software project's source code, change history, and configuration files are kept. A security researcher from Aikido Security reported that the token functions more like an account-wide access token than a project-scoped mail address. Anyone who obtains this token can act as the associated user across multiple repositories.
Terms in this story
- Token
- A short-lived digital pass that a server gives a logged-in user or app. After you sign in once, your browser or app presents a token on each request, and if malware steals that token the attacker can act as you without knowing your password. Security+ objective 4.6 lists the term
- exploited
- A piece of code or technique that uses a software flaw to break into or crash a system. Finding a vulnerability is only the discovery of a weakness, whereas an exploit is the working code or sequence of inputs that triggers that weakness in practice. Security+ objective 2.4 lists the term
- CI/CD pipelines
- The automated pipeline that tests, builds, and deploys software whenever developers push new code. Attackers love to compromise a company's CI/CD pipeline because that build server holds cloud keys and can inject malicious code directly into official software releases. Security+ objective 4.7 lists the term
- permissions
- The specific rights granted to an account or app to read, write, or run files and services. When a mobile app or browser extension asks for broad permissions, such as reading every web page you visit, a malicious update can abuse those rights to steal passwords.
- attack chain
- The full sequence of steps an intruder takes from initial break-in to final goal. Incident reports map out the full attack chain, such as a phishing email that drops a loader, steals domain credentials, and finally deploys ransomware across servers.
- patch
- A software update released by a developer to fix a bug or close a security flaw. When a software flaw is discovered, the vendor ships a patch so administrators and ordinary users can update their systems before attackers exploit the bug. Security+ objective 4.3 lists the term
- repository
- A central storage place where a software project's source code, change history, and configuration files are kept. Software teams collaborate by pushing code to a shared repository, and attackers scan public repositories for accidentally committed API keys or try to poison popular projects.
- secrets
- Private credentials used by software, such as API keys, database passwords, and encryption keys. Software teams use vault tools to keep secrets out of source code because anyone who finds a leaked secret in a public repository can log right in to the company's cloud services.
- allowlist
- An explicit list of approved programs, IP addresses, or email senders that a system permits. A strict server allowlist lets only approved administrative tools run, so even if an attacker uploads a new malware binary the operating system refuses to launch it. Security+ objective 2.5 lists the term
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the GBHackers website. Cite the article, not this page.
Read the full article on GBHackers (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Vulnerability and patch
"A long-lived GitLab incoming email token embedded in project email addresses for the "Email work item" feature can be exploited..." Found by reading the article; these exact words are in it - Security+ 2.4 Given a scenario, analyze indicators of malicious activity.
"......the "Email work item" feature can be exploited to push attacker-controlled code, create merge requests,..." Found in the opening sentences - Security+ 4.7 Explain the importance of automation and orchestration related to secure operations.
"......Attackers Push Code to Main and Execute CI/CD Jobs..." Found in the headline - CYBR 101 week 7: Linux, Windows, permissions and firewalls
"......requests, and trigger CI/CD pipelines using the permissions of the token owner. This issue can..." Found in the opening sentences
How a story is connected to the course, and every objective, week and job role
Same story at other outlets
- GitLab issue email's only security is obscurity
- GitLab Email Addresses Can Be Weaponized for Supply Chain Attacks
- A Leaked GitLab Issue Email Address Lets Anyone Push Code and Run CI Jobs as You
- GitLab Email Feature Vulnerability Lets Attackers Push Code Into Private Repositories
- Send GitLab an email, push to main