code-423n4 / 2021-11-nested-findings

1 stars 1 forks source link

Duplicated entries can be added into operators array #141

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

gzeon

Vulnerability details

Impact

Duplicated entries can be added into operators array. This may lead to unexpected behavior when trying to call removeOperator as it will only remove the first entry.

Proof of Concept

https://github.com/code-423n4/2021-11-nested/blob/f646002b692ca5fa3631acfff87dda897541cf41/contracts/NestedFactory.sol#L75

Recommended Mitigation Steps

Check if operator already exists in addOperator

maximebrugel commented 2 years ago

Duplicated : #180