Skip to content

tin-z/solidity_CVE-2021-42574-POC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solidity_CVE-2021-42574-POC

Jan 31 2023, Altin (tin-z), github.com/tin-z

PoC

POC of CVE-2021-42574 for solidity and solc compiler.

  • install
# solc and select 0.8.17 version (https://github.com/crytic/solc-select)
# foundry (https://github.com/foundry-rs/foundry)
  • deploy contract
SOLV=0.8.17
folder_t=test_open

mkdir $folder_t && \
cd $folder_t && \
forge init && \
forge install brockelmore/forge-std && \
rm test/Counter.t.sol

cp ../poc.sol src/
cp ../poc.t.sol test/
  • launch the poc
forge build  && \
forge test -vv

t1.jpg


  • So for example chrome does show that x = 42 is inside the comment

t2.jpg


  • But in vim we see the right position of the text

t3.jpg


details

About

POC of CVE-2021-42574 for solidity and solc compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published