As reported by The Hacker News, a design flaw in GitLab's incoming-email feature turns what appears to be a convenience address into a powerful, unauthenticated credential — one that enables code commits, branch creation, and CI/CD pipeline execution under a victim's identity.
The core problem is not a traditional software vulnerability. It is a trust model failure. GitLab treats any email arriving at a user's project-specific incoming address as authentic, without verifying the sender. Worse, the token embedded in that address is shared across every project the user can access, does not expire, and is exempt from IP allowlist enforcement. That combination creates a covert channel into the software supply chain that bypasses nearly every network and identity control an organization has put in place.
What Makes This Especially Dangerous
This is not simply a way to file a spoofed bug report. Aikido Security demonstrated that changing the address suffix from -issue to -merge-request converts the feature into a code-push mechanism. An attacker can attach a patch, name a target branch in the subject line, and GitLab will commit it — including to main if the victim's role permits. If the patch modifies .gitlab-ci.yml, the attacker's pipeline runs with the victim's permissions and any CI/CD secrets that role can access.
Three properties amplify the risk:
Who Is Most Exposed
Organizations with Maintainer or Developer-role users who have enabled the incoming-email feature and who participate in multiple projects — especially public ones — face the highest risk. A leaked Guest-level token is nearly harmless; a leaked Maintainer token can compromise protected branches, CI/CD secret variables, and deployment pipelines across an entire group.
Exposure surfaces include: email forwarding rules that leak project addresses, screenshots in public bug reports, commit history metadata, cached pages in search engines, and any internal ticketing system that displays the address in plaintext.
The attack path does not require access to the victim's mailbox, credentials, or session. It requires only the address string and the target project's path and numeric ID — both of which are publicly visible for public projects and guessable for private ones.
Shield53 Recommendations
Immediate Actions
- Identify exposed tokens. Audit all GitLab users in your instance for active incoming-email addresses. In GitLab Self-Managed, check
gitlab.rbfor the incoming-email configuration and enumerate which users have generated addresses. - Rotate all existing tokens. Force regeneration of incoming-email addresses for every user, especially those with Maintainer or Developer roles. Treat current tokens as compromised.
- Disable incoming email where unnecessary. If the issue-by-email and merge-request-by-email features are not operationally required, disable them entirely at the instance level.
- Restrict CI/CD pipeline modifications. Enforce protected environments, require approvals for
.gitlab-ci.ymlchanges, and use CI/CD pipeline rules to prevent unauthorized job execution. Store secrets in protected variables only. - Hunt for indicators of abuse. Review recent merge requests and commits for entries authored by email that lack corresponding session activity in audit logs. Look for branches created without a matching UI or API session. Check CI/CD job histories for unexpected pipeline runs.
- Enforce branch protection on
mainand all release branches. Require merge request approvals and prevent direct pushes, even for Maintainers, to reduce the blast radius of a token compromise.
Longer-Term Hardening
- Implement token rotation policies for all machine-generated credentials, including incoming-email addresses, even if GitLab does not enforce expiration natively.
- Adopt least-privilege group membership. Remove users from projects where their role exceeds their actual need, since token scope follows group and project membership.
- Monitor for email-based commit patterns in SIEM by correlating GitLab audit events with email gateway logs to detect commits originating from unexpected sender domains.
This issue underscores a broader pattern in DevOps platforms: convenience features that accept unauthenticated input channels often become implicit authentication mechanisms. Security teams should inventory every such channel — webhooks, email integrations, chatops connectors — and demand sender verification or cryptographic signing as a baseline requirement.