Improper Input Validation in Superfluid Context
Description
A specially crafted calldata may be used to impersonate other accounts due to improper input validation in the Superfluid context.
Examples
Insecure Code
solidity
$T.decodeCtx(ctx);Secure Code
solidity
require($T.isCtxValid(ctx), "Invalid context");
$T.decodeCtx(ctx);Remediation
Add input validation using require($T.isCtxValid(...), "..."); before calling $T.decodeCtx(ctx);
Rule Details
| Field | Value |
|---|---|
| ID | CODE-0658 |
| Category | Injection |
| Severity | CRITICAL |
| CWE | CWE-20 |
| Confidence | HIGH |
| Impact | HIGH |
| Likelihood | HIGH |
| Exploitability | MODERATE |
| Tags | input validation, superfluid |
| OWASP | N/A |
References
- https://medium.com/superfluid-blog/08-02-22-exploit-post-mortem-15ff9c97cdd
- https://rekt.news/superfluid-rekt/
- https://polygonscan.com/address/0x07711bb6dfbc99a1df1f2d7f57545a67519941e7