Skip to content
DoS Audit finding Intermediate

Function is vulnerable to gas griefing

The handleRandomness function in Spin.sol performs a low-level call to the user's address when transferring rewards, allowing a malicious recipient to execute gas-heavy code in their fallback function. This causes the supra router, which pays for the gas, to lose funds.

PotEater Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

51180 sc medium function is vulnerable to gas griefing

Submitted on Jul 31st 2025 at 19:05:05 UTC by @PotEater for Attackathon | Plume Network

Description

Brief / Intro

In the Spin.sol contract, the function handleRandomness contains a gas griefing attack vector due to an arbitrary external call (via a low-level call) that can trigger a malicious recipient's fallback/receive logic.

Vulnerability Details

handleRandomness is intended to be called by the supra router to provide the random number and determine the reward. However, when certain reward categories are chosen the contract calls _safeTransferPlume(user, rewardAmount * 1 ether); which ultimately performs a low-level call to the user's address. Because this calls an arbitrary address, the recipient can execute arbitrary code in their receive/fallback function.

Code snippet:

Solidity
        if (
            keccak256(bytes(rewardCategory)) == keccak256("Jackpot")
                || keccak256(bytes(rewardCategory)) == keccak256("Plume Token")
        ) {
            _safeTransferPlume(user, rewardAmount * 1 ether);
        }

A malicious recipient can include gas-heavy computations in their fallback/receive to cause excessive gas consumption when the supra router triggers handleRandomness, resulting in the supra router paying for that gas — effectively a theft of gas.

Impact Details

The supra router (the caller) must pay for any gas consumed during the external call. A malicious recipient can deliberately consume large amounts of gas in their fallback/receive, causing direct loss of funds for the supra router. This is a classic gas-griefing scenario.

References

https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/spin/Spin.sol#L261

Proof of Concept

{% stepper %} {% step %}

Step

User requests a spin by calling startSpin. {% endstep %}

{% step %}

Step

Supra router calls handleRandomness to provide the random number and determine the reward. {% endstep %}

{% step %}

Step

The reward category for the user is "Plume Token" or "Jackpot", so handleRandomness invokes _safeTransferPlume, which performs a low-level call to the user's address. {% endstep %}

{% step %}

Step

The user-controlled address has a malicious receive or fallback function that performs gas-heavy computations. When called, this consumes excessive gas, which the supra router must pay — resulting in theft of gas. {% endstep %} {% endstepper %}

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

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

Likely the contract uses a low-level call to transfer tokens to an arbitrary user address, which executes the recipient's fallback or receive function and consumes gas paid by the caller.

Impact

The supra router could lose funds by paying for gas consumed by a malicious recipient's fallback function.

What the attacker needed

Attacker controls a recipient address; attacker wins a spin with a reward category that triggers…; supra router calls handleRandomness

How it was found

  1. User requests a spin by calling startSpin.
  2. Supra router calls handleRandomness to provide the random number and determine the reward.
  3. The reward category is 'Plume Token' or 'Jackpot', so handleRandomness invokes _safeTransferPlume, which performs a low-level call to the user's address.
  4. The user-controlled address has a malicious receive or fallback function that performs gas-heavy computations, consuming excessive gas paid by the supra router.

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.

When a smart contract sends cryptocurrency to a user's address, the receiving address can run code automatically. If that code is designed to use a lot of computational effort, the sender ends up paying for it. Here, the contract that sends rewards can be tricked into paying extra gas fees because it calls the user's address directly.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by PotEater

View all

13 more disclosed reports, best first.

More from Plume Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.