Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-39940

An issue has been discovered in GitLab CE/EE affecting all versions starting from 13.2 before 14.3.6, all versions starting from 14.4 before 14.4.4, all versions starting from 14.5 before 14.5.2. GitLab Maven Package registry is vulnerable to a regular expression denial of service when a specifically crafted string is sent.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-39940
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 04:47 UTC · Revision 1

Source evidence

CVE-2021-39940

core-osv · Original source

Published 13 Dec 2021, 16:15 UTC

An issue has been discovered in GitLab CE/EE affecting all versions starting from 13.2 before 14.3.6, all versions starting from 14.4 before 14.4.4, all versions starting from 14.5 before 14.5.2. GitLab Maven Package registry is vulnerable to a regular expression denial of service when a specifically crafted string is sent.

osv:CVE-2021-39940
Complete source record
{
  "id": "45a8faf65bc7640e9ed83a2701375565f9765eebb748059d779e73ac30e96ca9",
  "url": "https://osv.dev/vulnerability/CVE-2021-39940",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-39940",
    "summary": "An issue has been discovered in GitLab CE/EE affecting all versions starting from 13.2 before 14.3.6, all versions starting from 14.4 before 14.4.4, all versions starting from 14.5 before 14.5.2. GitLab Maven Package registry is vulnerable to a regular expression denial of service when a specifically crafted string is sent.",
    "evidence": "osv:CVE-2021-39940",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-39940",
      "aliases": [
        "BIT-gitlab-2021-39940",
        "CVE-2021-39940"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://gitlab.com/gitlab-org/gitlab",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ce28f708ec5ca68092e16f55e47710367d32f2a1"
                },
                {
                  "fixed": "057790c613dea428aa523357c333ced5433794ee"
                },
                {
                  "introduced": "19c719febd74b6edf549bf6a2c0e36bf8f176d56"
                },
                {
                  "fixed": "a1175384df48e74899d664520601823016d81084"
                },
                {
                  "introduced": "490a8efda84a04e31ac41b882d95bb717c202437"
                },
                {
                  "fixed": "4511944420f00a68d5df2b3d81e5dae7fa2888f3"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*",
                    "range": [
                      {
                        "introduced": "13.2.0"
                      },
                      {
                        "fixed": "14.3.6"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "13.2.0"
                      },
                      {
                        "fixed": "14.3.6"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*",
                    "range": [
                      {
                        "introduced": "14.4.0"
                      },
                      {
                        "fixed": "14.4.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "14.4.0"
                      },
                      {
                        "fixed": "14.4.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*",
                    "range": [
                      {
                        "introduced": "14.5.0"
                      },
                      {
                        "fixed": "14.5.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "14.5.0"
                      },
                      {
                        "fixed": "14.5.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v14.5.1-ee",
            "v14.4.3-ee",
            "v14.5.0-ee",
            "v14.4.2-ee",
            "v14.4.0-ee"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-39940.json"
          }
        }
      ],
      "modified": "2026-10-30T10:31:01.106950758Z",
      "provider": "osv",
      "references": [
        "https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-39940.json",
        "https://gitlab.com/gitlab-org/gitlab/-/issues/263116",
        "https://hackerone.com/reports/997961"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-39940",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 430619,
  "published_at": "2021-12-13T16:15:09.667+00:00"
}