Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Arbitrary commands executed when running the test suite

Summary

Arbitrary commands executed when running the test suite

Vulnerability Details

The test testPwned uses the ffi cheatcode to create a file youve-been-pwned in the project directory. This is possible because ffi = true is enabled in the foundry.toml file. Although this time the command just created an empty file, this is a potential risk for developers as anyone who can change the tests of a project will be able to execute arbitrary commands on devices that run the tests

Impact

High

Tools Used

  • Manual Review

Recommendations

Remove the testPwned test and avoid using ffi cheatcode

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

testPwned: ffi enabled for test

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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