Cloudanix VulnDB

CVE-2024-8754

High · 8.1

CVSS

8.1

EPSS

0.4%

Published

Sep 12, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in GitLab lets attackers take over user accounts when organizations use a specific login method, so updating to a newer version is required to stop the problem.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Full Compromise
Component
Application
Class
Authentication Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Improper input validation in GitLab's JWT authentication flow permits an attacker to associate arbitrary unclaimed external provider identities with existing accounts, enabling account takeover without proper ownership verification.

Why it matters to the business

Attackers can hijack user accounts in organizations using JWT-based SSO, leading to unauthorized access to source code, issues, pipelines, and other sensitive project data with potential for persistent compromise until the flaw is addressed.

How an attack unfolds

An attacker identifies a target GitLab instance with JWT authentication enabled, crafts a malicious provider identity claim matching an unclaimed external identity, and submits it through the linking endpoint; the lack of validation accepts the claim and grants the attacker control over the victim's account.

How to fix it

Upgrade GitLab EE/CE to 17.1.7 or later, 17.2.5 or later, or 17.3.2 or later (incorporating commit 84cf95d60d2691201b17bb4d41a95987ded847fb) to enforce proper validation of provider identities during JWT account linking.

How to confirm the fix worked

After upgrade, attempt to link an unclaimed provider identity via the JWT flow and confirm the request is rejected; review authentication logs for any prior successful linking events from unknown providers.

Typical attack path

  1. Discover GitLab instance with JWT auth configured
  2. Identify target user accounts and their potential external providers
  3. Craft and submit forged provider identity linking request
  4. Gain authenticated session as the hijacked account
  5. Access or exfiltrate repositories and perform privileged actions

How to detect it

Search GitLab authentication and identity linking logs for unexpected provider identity associations; look for API calls to account linking endpoints originating from external IPs or using unusual JWT claims around the time of publication.

What your security team should do

  • Immediately upgrade all affected GitLab instances to the fixed versions
  • Audit existing linked external identities for any anomalous associations
  • Temporarily disable JWT authentication if upgrade cannot be performed promptly
  • Monitor authentication and account linking logs for suspicious activity
  • Review and enforce strict identity verification policies for SSO integrations

The record

An issue has been discovered in GitLab EE/CE affecting all versions from 16.9.7 prior to 17.1.7, 17.2 prior to 17.2.5, and 17.3 prior to 17.3.2. An improper input validation error allows attacker to squat on accounts via linking arbitrary unclaimed provider identities when JWT authentication is configured.

Affected packages

Ecosystem Package Introduced Fixed
Bitnami gitlab 16.9.7 17.1.7
Ubuntu:16.04:LTS gitlab 0 No fix
Ubuntu:Pro:16.04:LTS gitlab 0 No fix

Related vulnerabilities