Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-21276

Polr is an open source URL shortener. in Polr before version 2.3.0, a vulnerability in the setup process allows attackers to gain admin access to site instances, even if they do not possess an existing account. This vulnerability exists regardless of users' settings. If an attacker crafts a request with specific cookie headers to the /setup/finish endpoint, they may be able to obtain admin privileges on the instance. This is caused by a loose comparison (==) in SetupController that is susceptible to attack. The project has been patched to ensure that a strict comparison (===) is used to verify the setup key, and that /setup/finish verifies that no users table exists before performing any migrations or provisioning any new accounts. This is fixed in version 2.3.0. Users can patch this vulnerability without upgrading by adding abort(404) to the very first line of finishSetup in SetupController.php.

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

Source evidence

CVE-2021-21276

core-osv · Original source

Published 1 Feb 2021, 15:15 UTC

Polr is an open source URL shortener. in Polr before version 2.3.0, a vulnerability in the setup process allows attackers to gain admin access to site instances, even if they do not possess an existing account. This vulnerability exists regardless of users' settings. If an attacker crafts a request with specific cookie headers to the /setup/finish endpoint, they may be able to obtain admin privileges on the instance. This is caused by a loose comparison (==) in SetupController that is susceptible to attack. The project has been patched to ensure that a strict comparison (===) is used to verify the setup key, and that /setup/finish verifies that no users table exists before performing any migrations or provisioning any new accounts. This is fixed in version 2.3.0. Users can patch this vulnerability without upgrading by adding abort(404) to the very first line of finishSetup in SetupController.php.

osv:CVE-2021-21276
Complete source record
{
  "id": "38b93960e14fce9261094f4ea9dadebacd64df387233669cac63d945af1dd9a9",
  "url": "https://osv.dev/vulnerability/CVE-2021-21276",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-21276",
    "summary": "Polr is an open source URL shortener. in Polr before version 2.3.0, a vulnerability in the setup process allows attackers to gain admin access to site instances, even if they do not possess an existing account. This vulnerability exists regardless of users' settings. If an attacker crafts a request with specific cookie headers to the /setup/finish endpoint, they may be able to obtain admin privileges on the instance. This is caused by a loose comparison (==) in SetupController that is susceptible to attack. The project has been patched to ensure that a strict comparison (===) is used to verify the setup key, and that /setup/finish verifies that no users table exists before performing any migrations or provisioning any new accounts. This is fixed in version 2.3.0. Users can patch this vulnerability without upgrading by adding abort(404) to the very first line of finishSetup in SetupController.php.",
    "evidence": "osv:CVE-2021-21276",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2021-21276",
      "aliases": [
        "CVE-2021-21276",
        "GHSA-vg6w-8w9v-xxqc"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/cydrobolt/polr",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6e7353825711fa5c42c6ec3522254c6875be8dd7"
                },
                {
                  "fixed": "b1981709908caf6069b4a29dad3b6739c322c675"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:polrproject:polr:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.3.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b1981709908caf6069b4a29dad3b6739c322c675"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.2.0",
            "2.1.1",
            "2.1.0",
            "2.0.0",
            "2.0.0rc1",
            "1.5.1",
            "1.4.1",
            "1.4.1-beta",
            "1.3.3",
            "1.3.1",
            "1.3.0-stable",
            "1.2.5-beta",
            "1.2.4-be",
            "1.2.1",
            "1.1.0",
            "1.0.0-b-d",
            "1.0.0b-c",
            "1.0.0b",
            "v0.2.3-Alpha",
            "v0.1.5-RC2-KI",
            "v0.23-Alpha",
            "v0.22-Alpha",
            "v0.2-Alpha",
            "v0.15-RC2-KI",
            "0.11",
            "0.1.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21276.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:28.219133707Z",
      "provider": "osv",
      "references": [
        "https://github.com/cydrobolt/polr/releases/tag/2.3.0",
        "https://github.com/cydrobolt/polr/security/advisories/GHSA-vg6w-8w9v-xxqc",
        "https://github.com/cydrobolt/polr/commit/b1981709908caf6069b4a29dad3b6739c322c675"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-21276",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385408,
  "published_at": "2021-02-01T15:15:13.26+00:00"
}