The test suite includes a function named testPwned, which executes arbitrary commands on the user's machine. This presents a significant security risk, as such commands could potentially extract sensitive data, establish a reverse shell for remote control, search for passwords, or install malware.
This is the malicious test, it looks inoffensive as it just create a file called youve-been-pwned-remember-to-turn-off-ffi!
but there is no underlying reason for this test to be here except a malicious behavior.
A more alarming scenario is demonstrated in the following proof of concept, where the protocol's private key could be compromised with something like:
This issue is categorized as HIGH due to the direct risk it poses to funds and sensitive information.
The test, as it stands, is harmful, as it is used in a security contexts, but it is assumed that the general purpose of this functionality is to be harmful.
Manual Review
Always exercise caution before running third-party programs on your system. Ensure you understand the functionality of any command or script to prevent unintended consequences, especially those involving security vulnerabilities.
Ensure that ffi
is disabled by default in foundry.toml
and that no test cases or other functionality rely on ffi
to be enabled.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.