CVE-2024-8641
High · 8.8CVSS
8.8
EPSS
0.5%
Published
Sep 12, 2024
CISA due date
—
Cloudanix analysis
A flaw in GitLab could let someone who already has one of your build tokens steal your login session and act as you inside the platform.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Application
- Class
- Credential Exposure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
An attacker in possession of a victim's CI_JOB_TOKEN can exchange it for a valid GitLab session token belonging to the same victim, resulting in credential exposure.
Why it matters to the business
Attackers could impersonate users and perform unauthorized actions inside GitLab, risking source code theft, pipeline manipulation, or account takeover; the 759 days since publication without widespread exploitation reduces immediate urgency but still warrants patching.
How an attack unfolds
An attacker first obtains a victim's CI_JOB_TOKEN (for example via a compromised runner or log exposure), then submits it to GitLab in a crafted request that triggers issuance of the victim's session token, which the attacker can subsequently use to access the victim's account and resources.
How to fix it
Upgrade GitLab CE/EE to 17.1.7, 17.2.5, or 17.3.2 or later depending on the installed branch; apply the update as soon as possible given the elapsed time since disclosure.
How to confirm the fix worked
Confirm the running GitLab version matches or exceeds the fixed releases listed above and verify that CI_JOB_TOKEN to session token exchange behavior is no longer possible in a test environment.
Typical attack path
- Obtain victim's CI_JOB_TOKEN through logs, runner compromise, or other means
- Submit the token to GitLab in a request that triggers session token issuance
- Capture the returned session token
- Use the session token to authenticate as the victim and perform actions
How to detect it
Search GitLab access and audit logs for unusual session creations immediately following CI_JOB_TOKEN usage by the same user; look for authentication events where the originating token type differs from the resulting session.
What your security team should do
- Prioritize upgrade of all GitLab instances to a fixed version within the next sprint
- Audit CI runner configurations and logs for unintended exposure of CI_JOB_TOKEN values
- Review authentication and token handling policies to limit cross-token substitution risks
The record
An issue has been discovered in GitLab CE/EE affecting all versions starting from 13.7 prior to 17.1.7, from 17.2 prior to 17.2.5, and from 17.3 prior to 17.3.2. It may have been possible for an attacker with a victim's CI_JOB_TOKEN to obtain a GitLab session token belonging to the victim.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Bitnami | gitlab | 13.7.0 | 17.1.7 |
| Ubuntu:16.04:LTS | gitlab | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gitlab | 0 | No fix |
Related vulnerabilities
- CVE-2026-1751 A vulnerability has been discovered in GitLab CE/EE affecting all versions starting with… Also affects gitlab
- CVE-2025-3950 Exposure of Private Personal Information to an Unauthorized Actor in GitLab Also affects gitlab
- CVE-2025-9222 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in… Also affects gitlab
- CVE-2025-10569 Allocation of Resources Without Limits or Throttling in GitLab Also affects gitlab
- CVE-2025-11246 Insufficient Granularity of Access Control in GitLab Also affects gitlab
- CVE-2025-13772 Missing Authorization in GitLab Also affects gitlab
- CVE-2025-13761 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in… Also affects gitlab
- CVE-2025-13781 Missing Authorization in GitLab Also affects gitlab