Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-4097 Overview
CVE-2025-4097 is a denial of service vulnerability in GitLab Community Edition (CE) and Enterprise Edition (EE). The flaw allows an authenticated user to disrupt service availability by uploading specially crafted images. It affects all GitLab versions from 11.10 before 18.4.6, 18.5 before 18.5.4, and 18.6 before 18.6.2. The weakness is classified under [CWE-770] Allocation of Resources Without Limits or Throttling. GitLab addressed the issue in the December 10, 2025 patch release cycle.
Critical Impact
Authenticated attackers can exhaust GitLab server resources by uploading malformed images, degrading availability for all users on the instance.
Affected Products
- GitLab CE/EE versions 11.10 through 18.4.5
- GitLab CE/EE versions 18.5 through 18.5.3
- GitLab CE/EE versions 18.6 through 18.6.1
Discovery Timeline
- 2025-12-10 - GitLab releases patch versions 18.6.2, 18.5.4, and 18.4.6
- 2025-12-11 - CVE-2025-4097 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-4097
Vulnerability Analysis
The vulnerability resides in GitLab's image upload handling pipeline. An authenticated user can submit a specially crafted image file that triggers excessive resource consumption during processing. The condition results in a denial of service against the GitLab instance, impacting availability for legitimate users.
The issue affects both the Community and Enterprise editions across a wide version range dating back to GitLab 11.10. Because exploitation requires only low-privileged authenticated access over the network, any user with upload capabilities on projects, issues, or comments can trigger the condition. Confidentiality and integrity are not directly impacted.
Root Cause
The root cause is missing resource limits during image processing, categorized as [CWE-770] Allocation of Resources Without Limits or Throttling. The image processing routines fail to enforce bounds on memory, CPU, or processing time when handling malformed input, allowing a single upload to exhaust server resources.
Attack Vector
Exploitation requires network access to a GitLab instance and authenticated credentials with permission to upload images. The attacker submits the crafted image through any GitLab feature that accepts image attachments, such as issue comments, merge requests, or wiki pages. The processing of the malformed image consumes disproportionate server resources, degrading or halting service. No user interaction beyond the attacker's own upload is required.
Technical details are tracked in GitLab Issue #538192.
Detection Methods for CVE-2025-4097
Indicators of Compromise
- Sudden spikes in GitLab worker process memory or CPU consumption correlated with image upload endpoints.
- Repeated upload requests from a single authenticated user targeting attachment endpoints such as /uploads/ or /api/v4/projects/:id/uploads.
- GitLab Sidekiq or Workhorse worker timeouts and out-of-memory events during image processing.
Detection Strategies
- Monitor GitLab production logs for image processing errors, worker crashes, or exception traces originating from image handling libraries.
- Correlate authentication logs with resource exhaustion events to identify the account initiating the malformed uploads.
- Alert on abnormal upload sizes or upload frequency per user against baseline behavior.
Monitoring Recommendations
- Track GitLab instance version and confirm remediation across all self-managed deployments.
- Instrument reverse proxy and Workhorse metrics to surface latency spikes on upload routes.
- Forward GitLab application, Nginx, and system logs to a centralized analytics platform for correlation and retention.
How to Mitigate CVE-2025-4097
Immediate Actions Required
- Upgrade self-managed GitLab instances to 18.6.2, 18.5.4, or 18.4.6 as appropriate for your release channel.
- Audit user accounts with upload privileges and remove access for dormant or unnecessary users.
- Review recent image upload activity for signs of abnormal patterns tied to the vulnerability window.
Patch Information
GitLab released fixed versions 18.6.2, 18.5.4, and 18.4.6 on December 10, 2025. GitLab.com SaaS customers already run the patched release. See the GitLab Patch Release Announcement for full upgrade instructions and additional fixes included in the release.
Workarounds
- Restrict upload permissions to trusted user groups until patching completes.
- Enforce upload size limits at the reverse proxy layer to reduce processing overhead on malformed files.
- Apply rate limiting on upload endpoints to slow repeated exploitation attempts.
# Example: enforce upload size limit and rate limit at Nginx reverse proxy
http {
limit_req_zone $binary_remote_addr zone=uploads:10m rate=5r/m;
server {
client_max_body_size 10m;
location /uploads/ {
limit_req zone=uploads burst=10 nodelay;
proxy_pass http://gitlab_workhorse;
}
}
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

