GitLab
GitLab Community and Enterprise Editions Remote Code Execution Vulnerability
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.
Timeline
Days relative to CVE publicationFirst public PoC 43 days after publication; added to CISA KEV 194 days after publication. First PoC: mr-r3bot/Gitlab-CVE-2021-22205 (created 5 Jun 2021, found by us: backfilled).
PoC repositories
Found on GitHub.27 PoCs · 5 pending · 4 informational · 1 not a PoC · 2 suspicious or fake
PoCs 27
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| mr-r3bot/Gitlab-CVE-2021-22205 | 5 Jun 2021 +43 d | backfilled | 180 | PoC |
| XTeam-Wing/CVE-2021-22205 | 28 Oct 2021 +188 d | backfilled | 86 | PoC |
| r0eXpeR/CVE-2021-22205 | 28 Oct 2021 +188 d | backfilled | 69 | PoC |
| ZZ-SOCMAP/CVE-2021-22205 | 29 Oct 2021 +188 d | backfilled | 7 | PoC
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
| antx-code/CVE-2021-22205 | 29 Oct 2021 +188 d | backfilled | 7 | PoC
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
| Al1ex/CVE-2021-22205 | 29 Oct 2021 +188 d | backfilled | 287 | PoC |
| whwlsfb/CVE-2021-22205 | 30 Oct 2021 +189 d | backfilled | 23 | PoC |
| Qclover/Gitlab_RCE_CVE_2021_22205 | 1 Nov 2021 +192 d | backfilled | 0 | PoC |
| devdanqtuan/CVE-2021-22205 | 4 Nov 2021 +195 d | backfilled | 0 | PoC |
| hh-hunter/cve-2021-22205 | 5 Nov 2021 +195 d | backfilled | 0 | PoC via PoC Index |
| runsel/GitLab-CVE-2021-22205- | 5 Nov 2021 +196 d | backfilled | 3 | PoC |
| faisalfs10x/GitLab-CVE-2021-22205-scanner | 9 Nov 2021 +200 d | backfilled | 6 | Scanner |
| pizza-power/Golang-CVE-2021-22205-POC | 25 Nov 2021 +216 d | backfilled | 3 | PoC |
| DIVD-NL/GitLab-cve-2021-22205-nse | 27 Nov 2021 +218 d | backfilled | 1 | PoC |
| w0x68y/Gitlab-CVE-2021-22205 | 22 Dec 2021 +242 d | backfilled | 1 | PoC |
| j5s/Polaris | 3 Jan 2022 +255 d | backfilled | 2 | PoC via PoC Index |
| osungjinwoo/CVE-2021-22205-gitlab | 10 Mar 2022 +321 d | backfilled | 0 | PoC |
| momika233/cve-2021-22205-GitLab-13.10.2---Remote-Code-Execution-RCE-Unauthenticated- | 18 Apr 2022 +359 d | backfilled | 1 | PoC via PoC Index |
| keven1z/CVE-2021-22205 | 20 Jul 2022 +1.2 y | backfilled | 12 | PoC |
| overgrowncarrot1/DejaVu-CVE-2021-22205 | 2 Aug 2023 +2.3 y | backfilled | 0 | PoC |
| NukingDragons/gitlab-cve-2021-22205 | 1 Nov 2023 +2.5 y | backfilled | 1 | PoC |
| Parker-Corbitt/CS4770_CVE | 15 Dec 2023 +2.6 y | backfilled | 0 | PoC |
| cc3305/CVE-2021-22205 | 19 May 2024 +3.1 y | backfilled | 0 | PoC |
| liaboveall/SecureGuard-WAF | 7 Apr 2025 +4.0 y | backfilled | 1 | PoC via PoC Index |
| ccordeiro/CVE-2021-22205 | 19 Nov 2025 +4.6 y | backfilled | 0 | PoC |
| CyberCTF/vulhub-gitlab-cve-2021-22205 | 8 Oct 2026 +5.5 y | backfilled | 0 | PoC |
| d4ytox/CVE-2021-22205 | 10 Nov 2026 +5.5 y | 14 Nov 2026 | 1 | PoC |
Pending 5
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| AkBanner/CVE-2021-22205 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
| Seals6/CVE-2021-22205 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
| ahmad4fifz/CVE-2021-22205 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
| hhhotdrink/CVE-2021-22205 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
| honypot/CVE-2021-22205 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
Informational 4
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| findneo/GitLab-preauth-RCE_CVE-2021-22205 | 30 Oct 2021 +190 d | 2 | Informational · write-up |
| shang159/CVE-2021-22205-getshell | 1 Nov 2021 +192 d | 3 | Informational · write-up |
| asdaweee/GitLabRCECVE-2021-22205-GUI | 11 Jul 2023 +2.2 y | 0 | Informational · write-up
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
| Hikikan/CVE-2021-22205 | 8 Sep 2023 +2.4 y | 0 | Informational · write-up |
Not a PoC 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Jeromeyoung/CVE-2021-22210 | 1 Nov 2021 +191 d | 0 | Not a PoC · unrelated |
Suspicious or fake 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| c0okB/CVE-2021-22205 | 31 Oct 2021 +191 d | 13 | Fake |
| inspiringz/CVE-2021-22205 | 11 Nov 2021 +201 d | 239 | Fake |
Only PoCs count toward the first-PoC date and the characteristics below. "Backfilled" means we found the repository more than 30 days after it was created. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| Exploit-DB | GitLab 13.10.2 - Remote Code Execution (RCE) (Unauthenticated) | 17 Nov 2021 | 14 Nov 2026 |
| Metasploit | Metasploit exploit: GitLab Unauthenticated Remote ExifTool Command Injection (exploit/multi/http/gitlab_exif_rce) | 2 Nov 2021 | 14 Nov 2026 |
| nuclei template | nuclei template: GitLab CE/EE - Remote Code Execution | 27 Apr 2023 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 27 PoC reposGET /users/sign_in
- Key headers
Origin: {var}- Content-Type
application/x-www-form-urlencoded- Ports
- 1234, 8080
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36- Seen in
- 18 repos: Al1ex/CVE-2021-22205, CyberCTF/vulhub-gitlab-cve-2021-22205, Parker-Corbitt/CS4770_CVE, Qclover/Gitlab_RCE_CVE_2021_22205, XTeam-Wing/CVE-2021-22205, ZZ-SOCMAP/CVE-2021-22205, antx-code/CVE-2021-22205, ccordeiro/CVE-2021-22205, devdanqtuan/CVE-2021-22205, faisalfs10x/GitLab-CVE-2021-22205-scanner, keven1z/CVE-2021-22205, mr-r3bot/Gitlab-CVE-2021-22205, osungjinwoo/CVE-2021-22205-gitlab, pizza-power/Golang-CVE-2021-22205-POC, r0eXpeR/CVE-2021-22205, runsel/GitLab-CVE-2021-22205-, w0x68y/Gitlab-CVE-2021-22205, whwlsfb/CVE-2021-22205
- Evidence
- Al1ex/CVE-2021-22205/CVE-2021-22205.py:31 Al1ex/CVE-2021-22205/CVE-2021-22205.py:52 CyberCTF/vulhub-gitlab-cve-2021-22205/app/poc.py:22 CyberCTF/vulhub-gitlab-cve-2021-22205/checks/version.sh:4 Parker-Corbitt/CS4770_CVE/ctf_poc.py:23 Parker-Corbitt/CS4770_CVE/cve_poc.py:22
POST /uploads/user
- Key headers
Accept: application/jsonAccept-Language: en-US,en;q=0.5Cookie: _gitlab_session={var}Origin: http://127.0.0.1:8080Referer: {var}/projectsReferer: {var}/uploads/userUpgrade-Insecure-Requests: 1X-Csrf-Token: {var}X-Requested-With: XMLHttpRequest- Body markers
------WebKitFormBoundaryIMv3mxRg59TkFSX5 Content-Disposition: form-data; name="file"; filename="test.jpg" Content-Typename="file"--0a8af301db162802952b30a6f4e15026 Content-Disposition: form-data; name="file"; filename="test.jpg" Content-Type: imaginmultipart/form-data; boundary=----WebKitFormBoundaryIMv3mxRg59TkFSX5- Ports
- 1234, 8080
- PoC User-Agent
Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US);Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)- Seen in
- 17 repos: Al1ex/CVE-2021-22205, CyberCTF/vulhub-gitlab-cve-2021-22205, Parker-Corbitt/CS4770_CVE, Qclover/Gitlab_RCE_CVE_2021_22205, XTeam-Wing/CVE-2021-22205, ZZ-SOCMAP/CVE-2021-22205, antx-code/CVE-2021-22205, ccordeiro/CVE-2021-22205, devdanqtuan/CVE-2021-22205, faisalfs10x/GitLab-CVE-2021-22205-scanner, keven1z/CVE-2021-22205, mr-r3bot/Gitlab-CVE-2021-22205, osungjinwoo/CVE-2021-22205-gitlab, pizza-power/Golang-CVE-2021-22205-POC, r0eXpeR/CVE-2021-22205, runsel/GitLab-CVE-2021-22205-, whwlsfb/CVE-2021-22205
- Evidence
- Al1ex/CVE-2021-22205/CVE-2021-22205.py:41 Al1ex/CVE-2021-22205/CVE-2021-22205.py:62 CyberCTF/vulhub-gitlab-cve-2021-22205/app/poc.py:31 Parker-Corbitt/CS4770_CVE/ctf_poc.py:32 Parker-Corbitt/CS4770_CVE/cve_poc.py:31 Qclover/Gitlab_RCE_CVE_2021_22205/gitlab_rce.py:37
GET /projects/new
GET /{var}/{var}/-/snippets/new
GET /{var}/{var}/snippets/new
POST /projects
- Body markers
utf8=✓authenticity_token=project[ci_cd_only]=falseproject[name]=project[path]=project[description]=project[visibility_level]=20- Seen in
- 2 repos: ZZ-SOCMAP/CVE-2021-22205, antx-code/CVE-2021-22205
- Evidence
- ZZ-SOCMAP/CVE-2021-22205/CVE-2021-22205.py:55 antx-code/CVE-2021-22205/CVE-2021-22205.py:55
POST /{var}/{var}/uploads
- Key headers
Accept: application/jsonReferer: {var}/{var}/{var}/uploadsX-Csrf-Token: {var}- Body markers
name="file"inmultipart/form-data- Seen in
- 2 repos: ZZ-SOCMAP/CVE-2021-22205, antx-code/CVE-2021-22205
- Evidence
- ZZ-SOCMAP/CVE-2021-22205/CVE-2021-22205.py:91 antx-code/CVE-2021-22205/CVE-2021-22205.py:91
GET /latest.php
- Query
toggle_ids[]=updatexml(1,concat(0x7e,version(),0x7e),1)- Ports
- 8080, 8085, 9090, 9091
- Seen in
- 1 repo: liaboveall/SecureGuard-WAF
- Evidence
- liaboveall/SecureGuard-WAF/scripts/cve-2016-10134.sh:348
POST /$(openssl
- Body markers
file=@lol.jpginmultipart/form-data- Seen in
- 1 repo: momika233/cve-2021-22205-GitLab-13.10.2---Remote-Code-Execution-RCE-Unauthenticated-
- Evidence
- momika233/cve-2021-22205-GitLab-13.10.2---Remote-Code-Execution-RCE-Unauthenticated-/Poc.txt:13
POST /upload.action
- Body markers
@-=inapplication/x-www-form-urlencoded- Ports
- 8080, 8085, 9090, 9091
- Seen in
- 1 repo: liaboveall/SecureGuard-WAF
- Evidence
- liaboveall/SecureGuard-WAF/scripts/cve-2020-17530.sh:452
POST /users/sign_in
- Body markers
authenticity_token=user[login]=user[password]=user[remember_me]=0inapplication/x-www-form-urlencoded- Seen in
- 1 repo: whwlsfb/CVE-2021-22205
- Evidence
- whwlsfb/CVE-2021-22205/exploit.py:41
POST /wp-json/buddypress/v1/members/me
- Body markers
"roles":"administrator"inapplication/json- Ports
- 8080, 8085, 9090, 9091
- Seen in
- 1 repo: liaboveall/SecureGuard-WAF
- Evidence
- liaboveall/SecureGuard-WAF/scripts/cve-2021-21389.sh:544
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/users/sign_in(?:[?#].*)?$
(?i)^/uploads/user(?:[?#].*)?$
(?i)^/projects/new(?:[?#].*)?$
(?i)^/[^/?#]*/[^/?#]*/-/snippets/new(?:[?#].*)?$
(?i)^/[^/?#]*/[^/?#]*/snippets/new(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [1234,8080] (msg:"GG PoC-Monitor CVE-2021-22205 GitLab GitLab exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/users/sign_in"; http.header_names; content:"Origin"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2021-22205; classtype:web-application-attack; sid:9747706; rev:1;)
alert http any any -> $HOME_NET [1234,8080] (msg:"GG PoC-Monitor CVE-2021-22205 GitLab GitLab exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/uploads/user"; http.header; content:"Accept: application/json"; nocase; http.header; content:"Accept-Language: en-US,en|3b|q=0.5"; nocase; http.header; content:"Cookie: _gitlab_session="; nocase; http.header; content:"Origin: http://127.0.0.1:8080"; nocase; http.header_names; content:"Referer"; nocase; http.header_names; content:"Referer"; nocase; http.header; content:"Upgrade-Insecure-Requests: 1"; nocase; http.header_names; content:"X-Csrf-Token"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; http.request_body; content:"------WebKitFormBoundaryIMv3mxRg59TkFSX5 Content-Disposition: form-data|3b| name=|22|file|22||3b| filename=|22|test.jpg|22| Content-Type"; http.request_body; content:"name=|22|file|22|"; http.request_body; content:"--0a8af301db162802952b30a6f4e15026 Content-Disposition: form-data|3b| name=|22|file|22||3b| filename=|22|test.jpg|22| Content-Type: imag"; reference:url,poc.griffinguard.io/cve/CVE-2021-22205; classtype:web-application-attack; sid:9512240; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2021-22205 GitLab GitLab exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/projects/new"; reference:url,poc.griffinguard.io/cve/CVE-2021-22205; classtype:web-application-attack; sid:9053191; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2021-22205 GitLab GitLab exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/-/snippets/new"; reference:url,poc.griffinguard.io/cve/CVE-2021-22205; classtype:web-application-attack; sid:9320131; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2021-22205 GitLab GitLab exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/snippets/new"; reference:url,poc.griffinguard.io/cve/CVE-2021-22205; classtype:web-application-attack; sid:9259643; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: GitLab GitLab exploit attempt (CVE-2021-22205)
id: gg-pocmon-cve-2021-22205-9747706
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-22205. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2021-22205
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/users/sign_in'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2021.22205
title: GitLab GitLab exploit attempt (CVE-2021-22205)
id: gg-pocmon-cve-2021-22205-9512240
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-22205. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2021-22205
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/uploads/user'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2021.22205
title: GitLab GitLab exploit attempt (CVE-2021-22205)
id: gg-pocmon-cve-2021-22205-9053191
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-22205. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2021-22205
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/projects/new'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2021.22205
title: GitLab GitLab exploit attempt (CVE-2021-22205)
id: gg-pocmon-cve-2021-22205-9320131
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-22205. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2021-22205
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/-/snippets/new'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2021.22205
title: GitLab GitLab exploit attempt (CVE-2021-22205)
id: gg-pocmon-cve-2021-22205-9259643
status: experimental
description: Request pattern taken from public PoCs for CVE-2021-22205. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2021-22205
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/snippets/new'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2021.22205