Skip to content

The amount of the tip is controllable, which may lead to tax evasion

Low
lawvs published GHSA-9ww3-5wg4-f7g6 Jan 3, 2025

Package

follow-server

Affected versions

498526694dc8546ef38cf3ce69f4803ebce96bef~

Patched versions

498526694dc8546ef38cf3ce69f4803ebce96bef

Description

Hello, I've found an issue with the tip API.
https://api.follow.is/wallets/transactions/tip
The specific parameters are as follows:
{"entryId":"entryId","amount":"amount"}

The calculation of the tax is based on the amount. If the value of the amount is small, no tax will be generated.

    function _getTaxAmount(uint256 taxBasisPoints, uint256 amount)
        internal
        pure
        returns (uint256)
    {
        return (taxBasisPoints * amount) / 10_000;
    }

Because the RSS3 in these APP_USER_ROLE will be automatically replenished, gas will not become a burden for malicious users.

PoC
https://scan.rss3.io/tx/0x340a7d053adf1b950a292ea5e004ed5d6682b6c3501ee4c5ce2cd471c2635de7

Severity

Low

CVE ID

No known CVE

Weaknesses

No CWEs

Credits