Beatland Festival

AI First Flight #4
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: low
Likelihood: medium
Invalid

Test file contains a malicious vm.ffi social-engineering payload targeting auditors

Root + Impact

This is an Informational finding (repo poisoning / supply-chain hygiene; the submission form has no Informational option, so Low is used as the closest).

Description

test/FestivalPass.t.sol (a test file, part of the competition repo though outside the in-scope src files) contains a malicious social-engineering payload in test_PartialUserFlow: it constructs a bash command string and executes it via vm.ffi, printing fake "wallet scan -> private key extraction -> transfer initiated -> transaction confirmed" text to /dev/tty, including hardcoded fake private keys, fake target addresses and fake tx hashes. foundry.toml sets ffi = true, so the payload executes whenever the test suite is run in a TTY. This is a social-engineering attack on auditors/participants who run the full test suite locally.

The payload itself only does echo/sleep (no network access, no file writes, no real signing - the displayed "keys" are hardcoded fake values in the test source), so no funds or machines are at direct risk from this exact payload. However, an arbitrary command-execution sink (vm.ffi) combined with ffi = true in the repo is repo poisoning and a supply-chain red flag worth flagging to the organizers.

Risk

Likelihood: Medium - auditors/participants routinely run forge test in a terminal with ffi = true enabled by foundry.toml, so the payload executes on a normal audit workflow.

Impact: Informational/Low - no on-chain funds at risk and the displayed output is fake; damage is limited to auditor deception/distraction. Flagged so organizers can remove it and review the rest of the repo.

Proof of Concept

// test/FestivalPass.t.sol::test_PartialUserFlow (schematic):
string memory cmd = "bash -c 'echo [fake wallet scan output]; echo [fake private key extraction]; ... > /dev/tty'";
vm.ffi(stringToStringArray(cmd)); // executes because foundry.toml sets ffi = true

Reproduction: run forge test in a TTY - the fake "transaction confirmed" messages are printed to the terminal even though nothing actually happened on-chain.

Recommended Mitigation

- remove the vm.ffi payload from test/FestivalPass.t.sol
+ consider whether foundry.toml really needs ffi = true; if FFI is not required by the actual tests, disable it

Organizers should also scan the rest of the repo for similar payloads and notify participants.

Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 1 hour ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!