字号·· | 护眼
漏洞档案 · 严重

GitLab CE/EE 远程代码执行(CVE-2021-22205)

CVE-2021-22205 别名:GHSA-VGP2-3HXM-6X85
CVSS 10.0 / 3.1 EPSS 99.7% CISA KEV 在野利用 勒索软件利用 公开 PoC · 33 Nuclei 模板
综合风险100/ 100
CVSS10.0严重
EPSS99.7%30 天利用概率
机构收录时间2021-04-24更新 2026-12-01

研判简报

概述

GitLab CE/EE 自 11.9 起未正确校验传入文件解析器的图片文件,GitLab Workhorse 将 jpg/jpeg/tiff 扩展名文件交给 ExifTool 处理,ExifTool 依据内容而非扩展名选择解析器,DjVu 注释中的 token 被 eval 执行,导致远程命令执行。HackerOne 报告(#1154542)显示攻击者可通过上传特制图片在服务器上创建文件并取得 shell。该漏洞无需认证即可触发,面向公网 GitLab 实例风险极高,安全研究员与运维团队应优先关注。

严重性

CVSS 3.1 评分 10.0(AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H),综合风险分 100.0/100;EPSS 30 天利用概率 99.7%(百分位 100.0%,日期 2026-11-24)。攻击面为面向公网、可上传图片的 GitLab Web 接口,属未认证远程利用。

利用状态

截至核查日期 2026-11-24:CISA KEV 已收录(2021-11-03),已知存在勒索软件利用;已有公开 Nuclei 检测模板(http/cves/2021/CVE-2021-22205.yaml);Exploit-DB/公开 PoC 共 33 条;CISA SSVC 判定 automatable=yes、exploitation=active、technical_impact=total。KEV 要求动作:按厂商说明应用更新,期限 2021-11-17。

受影响产品

GitLab Community and Enterprise Editions:>=11.9, <13.8.8;>=13.9, <13.9.6;>=13.10, <13.10.3。涉及组件为 GitLab Workhorse 与 ExifTool 图片解析链。部署形态材料未给出。

修复版本

官方修复版本:13.8.8、13.9.6、13.10.3;Nuclei 模板 remediation 另提及 13.10.3 或 13.11.1。其余补丁细节材料未给出。

缓解措施

材料未给出针对该漏洞的临时缓解措施;KEV 要求动作仅为按厂商说明应用更新。在无法立即修复时,可参考的替代动作材料未给出。

响应步骤

  1. 排查资产清单中 GitLab CE/EE 版本是否落入 >=11.9, <13.8.8、>=13.9, <13.9.6、>=13.10, <13.10.3 区间。
  2. 对公网暴露的 GitLab 实例优先升级至 13.8.8、13.9.6、13.10.3(或 13.11.1)。
  3. 使用 Nuclei 模板 http/cves/2021/CVE-2021-22205.yaml 做被动版本识别,注意正匹配不保证可利用性。
  4. 检查是否存在异常图片上传与 Workhorse/ExifTool 相关命令执行痕迹,关注 T1059、T1190 行为。
  5. 结合 KEV 期限要求跟踪修复状态,并核查勒索软件相关迹象。
  6. 对无法及时升级的实例,材料未给出替代缓解动作,建议限制暴露面并持续监控。

参考来源

  1. https://nvd.nist.gov/vuln/detail/CVE-2021-22205kev
  2. https://www.exploit-db.com/exploits/50532exploit,exploitdb
  3. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-22205.yamlexploit,nuclei
  4. https://hackerone.com/reports/1154542x_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  5. https://gitlab.com/gitlab-org/gitlab/-/issues/327121x_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  6. https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-22205.jsonx_refsource_CONFIRM,x_refsource_CONFIRM,x_transferred,advisory,euvd
  7. http://packetstormsecurity.com/files/164768/GitLab-Unauthenticated-Remote-ExifTool-Command-Injection.htmlx_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  8. http://packetstormsecurity.com/files/164994/GitLab-13.10.2-Remote-Code-Execution.htmlx_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  9. https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-22205government-resource
  10. https://github.com/rapid7/metasploit-framework/tree/master/modules/exploit_multi/http/gitlab_exif_rceexploit,metasploit
  11. https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-9351advisory,euvd
  12. https://euvd.enisa.europa.eu/enisa/EUVD-2021-9351kev
  13. https://www.cisa.gov/known-exploited-vulnerabilities-catalogkev
  14. https://www.bleepingcomputer.com/news/security/new-cerber-ransomware-targets-confluence-and-gitlab-servers/kev
  15. https://cybersecurityworks.com/howdymanage/uploads/file/ransomware-_-2022-spotlight-report_compressed.pdfkev
  16. https://go.crowdstrike.com/rs/281-OBQ-266/images/Report2022GTR.pdfkev