Skip to content
Access control Audit finding Intermediate

Unrestricted vestFor

The vestFor function lacks access control, allowing anyone to call it for any user with a tiny amount of Vader. An attacker can front-run legitimate vestFor calls, locking the victim for 365 days and preventing legitimate conversions.

pauliax Follow

Originally disclosed on Code4rena

Submitted by pauliax, also found by hack3r-0m

Impact

Anyone can call function vestFor and block any user with a tiny amount of Vader. This function has no auth checks so a malicious actor can front-run legit vestFor calls with insignificant amounts. This function locks the user for 365 days and does not allow updating the value, thus forbids legit conversions.

Recommended Mitigation Steps

Consider introducing a whitelist of callers that can vest on behalf of others (e.g. Converter).

SamSteinGG (Vader) confirmed

The original report as published on Code4rena, by pauliax. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The vestFor function lacks any access control, allowing any caller to vest on behalf of any user.

Impact

An attacker can block any user from converting their tokens for 365 days by front-running with a tiny amount.

What the attacker needed

Attacker can call vestFor; victim has tokens to vest

The fix

The function should be fixed by introducing a whitelist of callers that can vest on behalf of others, such as the Converter contract.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract function called vestFor lets anyone create a vesting schedule for another user. Because there is no check on who can call it, an attacker can call it first with a very small amount, locking the victim's tokens for a year. This stops the victim from doing legitimate conversions.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by pauliax

View all

16 more disclosed reports, best first.

More from Vader Protocol contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.