{"id":"CVE-2021-39167","aliases":["CVE-2021-39167","GHSA-fg47-3c2x-m2wr"],"related":[],"kind":"vulnerability","state":"published","title":"TimelockController vulnerability in OpenZeppelin Contracts","summary":"OpenZepplin is a library for smart contract development. In affected versions a vulnerability in TimelockController allowed an actor with the executor role to escalate privileges. Further details about the vulnerability will be disclosed at a later date. As a workaround revoke 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OpenZepplin is a library for smart contract development. In affected versions a vulnerability in TimelockController allowed an actor with the executor role to escalate privileges. Further details about the vulnerability will be disclosed at a later date. As a workaround revoke 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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"OpenZepplin es una biblioteca para el desarrollo de contratos inteligentes. En las versiones afectadas, una vulnerabilidad en TimelockController permitía a un actor con el rol de ejecutor escalar privilegios. Más adelante se divulgarán más detalles sobre la vulnerabilidad. Como solución alternativa, revoque el rol de ejecutor de las cuentas que no estén estrictamente bajo el control del equipo. Recomendamos revocar todos los ejecutores que no sean también proponentes. Cuando aplique esta mitigación, asegúrese de que queda al menos un proponente y un ejecutor.","source":"nvd"}],"published":"2021-08-26T23:35:16.000Z","modified":"2026-07-08T06:29:37.864Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-269"],"affected":[{"ranges":[{"version":">=4.0.0, < 4.3.1","status":"affected"},{"version":">=3.3.0, < 3.4.2","status":"affected"},{"version":">= 3.3.0-solc-0.7, < 3.4.2-solc-0.7","status":"affected"}],"vendor":"OpenZeppelin","product":"openzeppelin-contracts","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.3.1"}],"ecosystem":"npm","package":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.3.0","status":"affected","fixed":"3.4.2"}],"ecosystem":"npm","package":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.3.0","fixed":"3.4.2"},{"status":"affected","introduced":"4.0.0","fixed":"4.3.1"}],"vendor":"openzeppelin","product":"contracts","cpe":"cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/commit/cec4f2ef57495d8b1742d62846da212515d99dd5","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md#431","tags":["patch","release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-fg47-3c2x-m2wr","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39167","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-39167","url":"https://www.cve.org/CVERecord?id=CVE-2021-39167","licence":"CVE Terms of Use","modified":"2024-08-04T01:58:18.229Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fg47-3c2x-m2wr","url":"https://github.com/advisories/GHSA-fg47-3c2x-m2wr","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:37.864Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-39167","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39167","licence":"Public domain","modified":"2026-06-17T04:03:14.070Z"}],"updatedAt":"2026-11-25T22:58:03.523Z","epss":{"score":0.0159,"percentile":0.76372,"date":"2026-12-01T12:00:22.000Z"}}