{
  "schema_version": "1.4.0",
  "id": "GHSA-fg47-3c2x-m2wr",
  "modified": "2021-09-13T20:30:10Z",
  "published": "2021-08-30T16:12:38Z",
  "aliases": [
    "CVE-2021-39167"
  ],
  "summary": "TimelockController vulnerability in OpenZeppelin Contracts ",
  "details": "### Impact\n\nA vulnerability in `TimelockController` allowed an actor with the executor role to take immediate control of the timelock, by resetting the delay to 0 and escalating privileges, thus gaining unrestricted access to assets held in the contract. Instances with the executor role set to \"open\" allow anyone to use the executor role, thus leaving the timelock at risk of being taken over by an attacker.\n\n### Patches\n\nA fix is included in the following releases of `@openzeppelin/contracts` and `@openzeppelin/contracts-upgradeable`:\n- 4.3.1\n- 3.4.2\n- 3.4.2-solc-0.7\n\nDeployed instances of `TimelockController` should be replaced with a fixed version by migrating all assets, ownership, and roles.\n\n### Workarounds\n\nRevoke the executor role from accounts not strictly under the team's control. We recommend revoking all executors that are not also proposers. When applying this mitigation, ensure there is at least one proposer and executor remaining.\n\n### References\n\n[Post-mortem](https://forum.openzeppelin.com/t/timelockcontroller-vulnerability-postmortem/14958).\n\n### Credits\n\nThe issue was identified by an anonymous white hat hacker through [Immunefi](https://immunefi.com/).\n\n### For more information\n\nIf you have any questions or comments about this advisory, or need assistance executing the mitigation, email us at security@openzeppelin.com.\n",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@openzeppelin/contracts"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "4.0.0"
            },
            {
              "fixed": "4.3.1"
            }
          ]
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@openzeppelin/contracts"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "3.3.0"
            },
            {
              "fixed": "3.4.2"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-fg47-3c2x-m2wr"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39167"
    },
    {
      "type": "WEB",
      "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/commit/cec4f2ef57495d8b1742d62846da212515d99dd5"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/OpenZeppelin/openzeppelin-contracts"
    },
    {
      "type": "WEB",
      "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md#431"
    }
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-269"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2021-08-27T12:59:07Z",
    "nvd_published_at": "2021-08-27T00:15:00Z"
  }
}