Description
An issue has been discovered in GitLab CE/EE affecting all versions starting from 11.9. GitLab was not properly validating image files that were passed to a file parser which resulted in a remote command execution.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| GitLab | GitLab | >=11.9, <13.8.8, >=13.9, <13.9.6, >=13.10, <13.10.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | gitlab | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
GitLab Unauthenticated Remote ExifTool Command Injection
exploit/multi/http/gitlab_exif_rce
Exploit-DB 1
- GitLab 13.10.2 - Remote Code Execution (RCE) (Unauthenticated) EDB-50532 · webapps · Nov 17, 2021
GitHub 27 repositories · most starred shown
-
Al1ex/CVE-2021-22205 ★ 287 · Oct 29, 2021
CVE-2021-22205& GitLab CE/EE RCE
-
inspiringz/CVE-2021-22205 ★ 238 · Nov 11, 2021
GitLab CE/EE Preauth RCE using ExifTool
-
mr-r3bot/Gitlab-CVE-2021-22205 ★ 180 · Jun 5, 2021
-
XTeam-Wing/CVE-2021-22205 ★ 86 · Oct 28, 2021
Pocsuite3 For CVE-2021-22205
-
r0eXpeR/CVE-2021-22205 ★ 69 · Oct 28, 2021
CVE-2021-22205 Unauthorized RCE
-
whwlsfb/CVE-2021-22205 ★ 23 · Oct 30, 2021
CVE-2021-22205 Gitlab 未授权远程代码执行漏洞 EXP, 移除了对djvumake & djvulibre的依赖,可在win平台使用
-
c0okB/CVE-2021-22205 ★ 13 · Oct 31, 2021
CVE-2021-22205 RCE
-
keven1z/CVE-2021-22205 ★ 12 · Jul 20, 2022
CVE-2021-22205 检测脚本,支持getshell和命令执行
-
ZZ-SOCMAP/CVE-2021-22205 ★ 7 · Oct 29, 2021
Gitlab CE/EE RCE 未授权远程代码执行漏洞 POC && EXP CVE-2021-22205
-
faisalfs10x/GitLab-CVE-2021-22205-scanner ★ 6 · Nov 9, 2021
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- GitLab CE/EE - Remote Code Execution http/cves/2021/CVE-2021-22205.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
References
- https://hackerone.com/reports/1154542
- https://gitlab.com/gitlab-org/gitlab/-/issues/327121
- https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-22205.json
- http://packetstormsecurity.com/files/164768/GitLab-Unauthenticated-Remote-ExifTool-Command-Injection.html
- http://packetstormsecurity.com/files/164994/GitLab-13.10.2-Remote-Code-Execution.html