Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Improper Control of Generation of Code ('Code Injection') vulnerabilities in an interactive lesson.
Start learningUpgrade vyper
to version 0.4.0 or higher.
vyper is a Pythonic Smart Contract Language for the EVM.
Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') due to the _build_create_IR
function of the create_from_blueprint
builtin not caching the args
argument to the stack, leading to its potential evaluation multiple times instead of retrieving the value from the stack. This could allow an attacker to trigger unintended behavior by exploiting the double evaluation of args
.
src1 = """
c: uint256
"""
deployer = """
created_address: public(address)
deployed: public(uint256)
@external
def get() -> Bytes[32]:
self.deployed += 1
return b''
@external
def create_(target: address):
self.created_address = create_from_blueprint(target, raw_call(self, method_id("get()"), max_outsize=32), raw_args=True, code_offset=3)
"""
Factory = b.loads_partial(src1)
c = Factory.deploy_as_blueprint()
c2 = b.loads(deployer, b'')
c2.create_(c)
c2.deployed()