Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-39885

A Stored XSS in merge request creation page in all versions of Gitlab EE starting from 13.7 before 14.1.7, all versions starting from 14.2 before 14.2.5, and all versions starting from 14.3 before 14.3.1 allows an attacker to execute arbitrary JavaScript code on the victim's behalf via malicious approval rule names

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-39885
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:54 UTC · Revision 1

Source evidence

CVE-2021-39885

core-osv · Original source

Published 4 Oct 2021, 17:15 UTC

A Stored XSS in merge request creation page in all versions of Gitlab EE starting from 13.7 before 14.1.7, all versions starting from 14.2 before 14.2.5, and all versions starting from 14.3 before 14.3.1 allows an attacker to execute arbitrary JavaScript code on the victim's behalf via malicious approval rule names

osv:CVE-2021-39885
Complete source record
{
  "id": "2741fe0a83da8633fbfbf32b1230008936de1b45431fc177801562302c16d992",
  "url": "https://osv.dev/vulnerability/CVE-2021-39885",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-39885",
    "summary": "A Stored XSS in merge request creation page in all versions of Gitlab EE starting from 13.7 before 14.1.7, all versions starting from 14.2 before 14.2.5, and all versions starting from 14.3 before 14.3.1 allows an attacker to execute arbitrary JavaScript code on the victim's behalf via malicious approval rule names",
    "evidence": "osv:CVE-2021-39885",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-39885",
      "aliases": [
        "BIT-gitlab-2021-39885",
        "CVE-2021-39885"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://gitlab.com/gitlab-org/gitlab",
              "type": "GIT",
              "events": [
                {
                  "introduced": "036576a25d67513637c1e2cba5859af47695188e"
                },
                {
                  "fixed": "9cd657e5179e339171d27e4573b8f5711db1d824"
                },
                {
                  "introduced": "38bbb40bb77dd3e0f0281c4363e2ef298e650c42"
                },
                {
                  "fixed": "72c1da0383a35604f4b2d73a7ed8e6a2c4ee64b1"
                },
                {
                  "introduced": "dec73e99fddac59c0bf816dc4bffd2a30abae6de"
                },
                {
                  "last_affected": "dec73e99fddac59c0bf816dc4bffd2a30abae6de"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "13.7.0"
                      },
                      {
                        "fixed": "14.1.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "14.2.0"
                      },
                      {
                        "fixed": "14.2.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:gitlab:gitlab:14.3.0:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "14.3.0"
                      },
                      {
                        "last_affected": "14.3.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "14.3.0",
            "v14.2.4-ee",
            "v14.3.0-ee",
            "v14.2.3-ee",
            "v14.2.1-ee",
            "v14.2.0-ee"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-39885.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:55.126917099Z",
      "provider": "osv",
      "references": [
        "https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-39885.json",
        "https://gitlab.com/gitlab-org/gitlab/-/issues/341140",
        "https://hackerone.com/reports/1342009"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-39885",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 386460,
  "published_at": "2021-10-04T17:15:08.247+00:00"
}