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

Unlock pragma used in multiple contracts #66

Closed
code423n4 opened this issue May 27, 2021 · 2 comments
Closed

Unlock pragma used in multiple contracts #66

code423n4 opened this issue May 27, 2021 · 2 comments

Comments

@code423n4
Copy link
Contributor

Handle

shw

Vulnerability details

Impact

In most contracts, the pragma statements are declared as pragma solidity >=0.6.0 <0.8.0;, which are unlocked and could cause the contracts to accidentally be compiled or deployed using an outdated or buggy compiler version.

Proof of Concept

Referenced code:
Please use grep -R pragma . to find the unlocked pragma statements.

Recommended Mitigation Steps

Should lock pragmas to a specific compiler version. Besides, consider the known compiler bugs in the following references and check whether the contracts include those bugs.

Solidity compiler bugs:
Solidity repo - known bugs
Solidity repo - bugs by version

@code423n4 code423n4 added 1 (Low Risk) bug Something isn't working labels May 27, 2021
code423n4 added a commit that referenced this issue May 27, 2021
@fairside-core
Copy link
Collaborator

The pragma statements were left unlocked to allow flexibility in development. I believe that since this is not a functional finding, it should be marked as 0 (non-critical).

@cemozerr
Copy link
Collaborator

cemozerr commented Jun 7, 2021

Duplicate of #25. Labeling it as low risk as it could indeed cause the contracts to accidentally be compiled or deployed using an outdated or buggy compiler version

@cemozerr cemozerr closed this as completed Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants