Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenZeppelin UUPSUpgradeable reinitializer function triggers Unprotected Initializer #836

Closed
studiov-dev opened this issue Mar 13, 2025 · 1 comment · Fixed by #874
Closed
Labels
good first issue Good for newcomers

Comments

@studiov-dev
Copy link

Detector Title
H - Unprotected Initializer

To Reproduce
Steps to reproduce the behavior:

  1. Clone repo: https://github.com/Studio-V-Tech/neulock-onchain.git
  2. Run npm i
  3. Run aderyn with this: aderyn -x mocks,harnesses,old
  4. Scroll down to [H-1: Unprotected initializer]
  5. See error

Screenshots
N/A

Expected behavior
Issue should not be detected, because function uses the reinitializer(2) modifier from OpenZeppelin UUPSUpgradeable lib.

Additional context
The tests in npm run test test/Upgrades.ts pass, including Reverts on running reinitialize function on V2 again, which checks that the reinitializer() modifier works as expected.

@TilakMaddy
Copy link
Contributor

Thanks for surfacing this :) That detector needs to be improved for sure...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants