CriticalCVE-2021-22205

    GitLab Community and Enterprise Editions Remote Code Execution Vulnerability (CVE-2021-22205)

    Published Last modified In CISA KEV since Sources: OSV, CVE.org

    What is affected, what to do

    An unauthenticated attacker can achieve remote code execution by uploading malicious images to GitLab CE/EE. This vulnerability affects all versions starting from 11.9 and is actively exploited in ransomware campaigns since 2021. Affected products include specific Bitnami GitLab installations. Immediate patching to the latest version is critical to mitigate this risk.

    The vulnerability is being actively exploited; treat it as a priority. CISA lists it as used in ransomware campaigns. Update gitlab to version 13.9.6. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • GitLab gte 11.9, <13.8.8..*

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    10.0

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    10.0

    CVSS v3

    Severity Critical on the scale from 0 to 10.

    Source: OSV, CVE.org

    99.73 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.95

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    254.92 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploited
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    10.0 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    10.0
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    99.73 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.95
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary

    Response and mitigation

    Why act now?

    Prioritisation rationale

    This flaw is network-reachable without authentication or user interaction and yields code execution with a scope change. It is among the CVEs most likely to be exploited anywhere, and public exploits have been baked into botnet and scanner toolkits for years. CISA flags it as used in ransomware campaigns. Typical victims are self-hosted, internet-facing GitLab instances at mid-market firms, research institutions and software service providers, which often hold CI/CD secrets and production deployment paths. Treat any exposed, unpatched instance as a critical incident with presumed compromise. Patch internal-only instances promptly as well, since they become prime lateral-movement targets once an attacker has a foothold.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Check version and patch: All GitLab CE/EE instances from 11.9 onward are affected, including Bitnami images. Upgrade to the fixed releases: per GitLab's April 2021 security release these are 13.8.8, 13.9.6 and 13.10.3, or any newer supported version. Verify the exact versions in the vendor advisory. Check the running version via gitlab-rake gitlab:env:info or /help.
      • Cut exposure now: Restrict internet-facing instances that cannot be patched within hours to VPN or corporate source ranges at the firewall or reverse proxy (TCP 80/443). Exploitation requires no authentication.
      • Assume compromise and hunt: This bug has been mass-exploited since 2021, so treat any unpatched, exposed instance as likely compromised. Look for:
        • newly created admin accounts (User.where(admin: true) in gitlab-rails console),
        • unknown personal access tokens,
        • cron jobs and processes owned by the git user,
        • cryptominer processes.
      • Rotate secrets if compromise is suspected: Regenerate CI/CD variables, runner registration tokens, deploy keys and deploy tokens, PATs, integration secrets and /etc/gitlab/gitlab-secrets.json. A code host holding pipeline secrets is a direct path into production and cloud accounts.
      • Preserve evidence before rebuilding: Collect /var/log/gitlab/ (workhorse, nginx, gitlab-rails) and the uploads directory before cleanup. On confirmed compromise, rebuild rather than clean in place.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: Run GitLab only behind VPN/ZTNA. Apply egress filtering on the GitLab host and allow only required destinations (mirror targets, SMTP, package repos). This kills reverse shells and mining-pool connections.
      • WAF/IPS: Block or inspect HTTP POSTs to /uploads/user and /<namespace>/<project>/uploads whose body contains the DjVu magic AT&TFORM, especially when disguised with a .jpg/.jpeg extension. Drop unauthenticated requests to these paths outright.
      • Configuration workaround: If upgrading is blocked, update the bundled ExifTool to a release fixing CVE-2021-22204 (12.24 or later). Alternatively, strip the DjVu module from ExifTool per GitLab's hotpatch guidance. Note that Omnibus updates overwrite this change.
      • Endpoint hardening: Confine the git service account with AppArmor/SELinux or a container seccomp profile so that perl/exiftool cannot spawn shells (sh, bash) or downloaders (curl, wget).
      • IAM/least privilege: Disable open sign-up (Admin → Settings → Sign-up restrictions). Minimise the number of admins and enforce 2FA on all of them. Scope runner tokens to groups or projects instead of the whole instance.
    3. Runbook step 3

      Detection rules

      • EDR/Sysmon process ancestry: gitlab-workhorse → exiftool/perl → sh/bash/curl/wget/python. Sigma shape: ParentImage|endswith: '/perl' AND ParentCommandLine|contains: 'exiftool' AND Image|endswith: ['/sh','/bash','/curl','/wget']. On Linux with auditd: execve with uid=git and a parent ExifTool process.
      • Web access log (/var/log/gitlab/nginx/gitlab_access.log): POSTs to /uploads/user from external IPs with no prior login, often returning 422. SPL: index=web uri_path="/uploads/user" method=POST | stats count by src_ip, status.
      • Workhorse log (/var/log/gitlab/gitlab-workhorse/current): exiftool command failed or image-processing errors on sessionless requests are a strong indicator of exploit attempts.
      • Network telemetry (Zeek/Suricata): Suricata rule idea: alert http any any -> $GITLAB_SERVERS any (msg:"CVE-2021-22205 DjVu upload"; flow:to_server; http.method; content:"POST"; http.uri; content:"/uploads/"; http.request_body; content:"AT&TFORM"; sid:...;). Also alert on new outbound connections from the GitLab host, such as mining pools or unusual ports.
      • Application audit (production_json.log, Audit Events): New admin users, role flips to admin: true or fresh API tokens shortly after suspicious uploads. Use of gitlab-rails runner for privilege escalation is a known pattern.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    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.

    Source: OSV (Open Source Vulnerabilities), CISA KEV Catalog, cvelistv5, NVD (NIST)

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    GitLabGitLab
    • ≥ 11.9, <13.8.8
    • —
    gitlabgitlab
    • 13.9.0 – < 13.9.6
    • 11.9.0 – < 13.8.8
    • 13.10.0 – < 13.10.3
    • 13.9.6
    • 13.8.8
    • 13.10.3
    Distribution and container packages (3)

    Downstream packages (e.g. Bitnami, Debian, Ubuntu, Red Hat). Versions refer to the distribution, not the vendor.

    Distribution and container packages
    Affected versionsFixed in
    bitnamigitlab
    • 13.9.0
    • 13.10.0
    • 11.9.0
    • —
    • —
    • —

    Vendors and products

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited
    Packet StormGitLab Unauthenticated Remote ExifTool Command Injection (opens in a new tab)packetstormsecurity.comPoC (publicly reported)reported, not verified—
    Packet StormGitLab 13.10.2 Remote Code Execution (opens in a new tab)packetstormsecurity.comPoC (publicly reported)reported, not verified—
    PoC-in-GitHub (nomi-sec)vulhub-gitlab-cve-2021-22205 (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)CVE-2021-22205 (opens in a new tab)github.comPoC (publicly reported)reported, not verified

    References & sources

    • packetstormsecurity.comfiles/164768/GitLab-Unauthenticated-Remote-ExifTool-Command-Inj…web, x_refsource_MISC
    • packetstormsecurity.comfiles/164994/GitLab-13.10.2-Remote-Code-Execution.htmlweb, x_refsource_MISC
    • gitlab.comgitlab-org/cves/-/blob/master/2021/CVE-2021-22205.jsonweb, x_refsource_CONFIRM
    • gitlab.comgitlab-org/gitlab/-/issues/327121web, x_refsource_MISC
    • hackerone.comreports/1154542web, x_refsource_MISC
    • NVD (NIST)vuln/detail/CVE-2021-22205web
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2021-22205web, government-resource

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    1. Record modifiedCISA ADP

      CISA assessment (SSVC): exploitation: active, automatable: yes

      Show the original change
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      SSVC assessmentchanged
      {"id":"CVE-2021-22205","role":"CISA Coordinator","options":[{"exploitation":"active"},{"automatable":"yes"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2026-08-05T19:53:08.964558Z"}
      {"id":"CVE-2021-22205","role":"CISA Coordinator","options":[{"exploitation":"active"},{"automatable":"yes"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2021-10-26T00:00:00+00:00"}

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    2. Record modifiedCISA ADP

      CISA assessment (SSVC): exploitation: active, automatable: yes

      Show the original change
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      SSVC assessmentchanged
      {"id":"CVE-2021-22205","role":"CISA Coordinator","options":[{"exploitation":"active"},{"automatable":"rapid"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2021-10-26T00:00:00+00:00"}
      {"id":"CVE-2021-22205","role":"CISA Coordinator","options":[{"exploitation":"active"},{"automatable":"yes"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2026-08-05T19:53:08.964558Z"}

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2021-22205
    <a href="https://intel.neosec.eu/en/cve/CVE-2021-22205"><img src="https://intel.neosec.eu/badge/cve/CVE-2021-22205.svg?lang=en" alt="CVE-2021-22205 – NEOSEC Intel" height="20"></a>