CVE-2021-22205 in gitlab

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

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.

Affected software: gitlab

Scores

What LogPulse has for it

How to mitigate it

Upgrade GitLab CE/EE to 13.10.3 or later (CVE-2021-22205)

Patch or upgrade. GitLab CE/EE from 11.9 before 13.8.8, 13.9 before 13.9.6 and 13.10 before 13.10.3 passes uploaded images to ExifTool, which lets an unauthenticated attacker run commands (KEV, ransomware). Upgrading to a fixed release, ideally a current supported one, removes the flaw.

Applies to: GitLab CE/EE 11.9 before 13.8.8, 13.9 before 13.9.6 and 13.10 before 13.10.3.

  1. Find the GitLab version: Admin area, Dashboard, Components, or run 'sudo gitlab-rake gitlab:env:info' on the server.
  2. Take a backup with 'sudo gitlab-backup create' and copy /etc/gitlab/gitlab-secrets.json and gitlab.rb off the server.
  3. Upgrade along the GitLab upgrade path (https://docs.gitlab.com/update/upgrade_paths/) to a current supported release; at minimum install 13.8.8, 13.9.6 or 13.10.3 for your minor version.
  4. Run 'sudo gitlab-ctl reconfigure' and check 'sudo gitlab-ctl status' and the version in the Admin area.
  5. If you cannot upgrade at once, restrict the web interface to VPN or internal networks until it is upgraded.
  6. After upgrading, review Admin area, Users for unknown admin accounts and look for unknown processes, cron jobs and SSH keys for the git user on the server; a server that was reachable from the internet before 2021 should be treated as possibly compromised.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse