CVE-2021-22205 GitLab Community and Enterprise Editions Remote Code Execution
Remote attackers can execute arbitrary commands by uploading malicious image files to GitLab, requiring immediate patching.
- Exploited in the wild
- Since 3 Nov 2021
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-22205?
CVE-2021-22205 is a critical code injection vulnerability in Gitlab Gitlab, published on 23 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-94
Which versions are affected by CVE-2021-22205?
1 open source package ship an affected version, including gitlab. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gitlab Bitnami | From 11.9.0 | 13.8.8, 13.9.6, 13.10.3 |
Products include Gitlab Gitlab.
How do I fix CVE-2021-22205?
Upgrade gitlab to a fixed version for your release line: 13.8.8, 13.9.6 or 13.10.3. US federal agencies must fix it by 17 Nov 2021.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2021-22205 being exploited?
Yes. Attackers have exploited CVE-2021-22205 in the wild since at least 3 Nov 2021, including in ransomware campaigns.
Public exploit code: 1 Metasploit module, 1 Exploit-DB entry, 1 Nuclei template and 26 proofs of concept on GitHub.
Other vulnerabilities in Gitlab Gitlab
- CVE-2026-97229 GitLab Community Edition and Enterprise Edition Integer Overflow or Wraparound
- CVE-2026-85706 GitLab Community Edition and Enterprise Edition Path Traversal
- CVE-2023-7028 GitLab Community and Enterprise Editions Improper Access Control
- CVE-2021-39935 GitLab Community and Enterprise Editions Server-Side Request Forgery (SSRF)
- CVE-2021-22175 GitLab Server-Side Request Forgery (SSRF)
Sources
Also known as BIT-gitlab-2021-22205, GHSA-vgp2-3hxm-6x85, UBUNTU-CVE-2021-22205.