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

No any external functions in HooksFactory are protected by SphereX #226

Open
c4-bot-3 opened this issue Sep 18, 2024 · 0 comments
Open

No any external functions in HooksFactory are protected by SphereX #226

c4-bot-3 opened this issue Sep 18, 2024 · 0 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working edited-by-warden 🤖_primary AI based primary recommendation 🤖_38_group AI based duplicate group recommendation sufficient quality report This report is of sufficient quality

Comments

@c4-bot-3
Copy link
Contributor

c4-bot-3 commented Sep 18, 2024

Lines of code

https://github.com/code-423n4/2024-08-wildcat/blob/main/src/HooksFactory.sol#L34
https://github.com/code-423n4/2024-08-wildcat/blob/main/src/market/WildcatMarket.sol#L37-L42

Vulnerability details

Impact

The Wildcat team can not manage any external functions in HooksFactory with SphereX

Proof of Concept

The Wildcat protocol states that all external functions are under SphereX protection:

Without going into too much detail here, all external functions are wrapped in a modifier which sanity-checks any given transaction against a training set, reverting said transaction if it deviates too far from expected behaviour.

While HooksFactory is inherited from SphereXProtectedRegisteredBase, it does not use the modifier sphereXGuardExternal for any external functions.
The modifier sphereXGuardExternal is also missed on WildcatMarket#rescueTokens().

Tools Used

Manual review

Recommended Mitigation Steps

Introduce the modifier sphereXGuardExternal for WildcatMarket#rescueTokens() and all external functions in HooksFactory.

Assessed type

Context

@c4-bot-3 c4-bot-3 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Sep 18, 2024
c4-bot-10 added a commit that referenced this issue Sep 18, 2024
@c4-bot-4 c4-bot-4 changed the title All external functions in HooksFactory are not protected by SphereX No any external functions in HooksFactory are protected by SphereX Sep 18, 2024
@c4-bot-12 c4-bot-12 added 🤖_38_group AI based duplicate group recommendation 🤖_primary AI based primary recommendation labels Sep 18, 2024
howlbot-integration bot added a commit that referenced this issue Sep 20, 2024
@howlbot-integration howlbot-integration bot added the sufficient quality report This report is of sufficient quality label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working edited-by-warden 🤖_primary AI based primary recommendation 🤖_38_group AI based duplicate group recommendation sufficient quality report This report is of sufficient quality
Projects
None yet
Development

No branches or pull requests

3 participants