VDB
Sign up
MEDIUM5.3

PYSEC-2024-209

Quick fix

PYSEC-2024-209 — vyper: upgrade to the fixed version with the command below.

pip install --upgrade 'vyper>=0.4.0'

Details

Vyper is a pythonic Smart Contract Language for the Ethereum virtual machine. In versions 0.3.10 and prior, using the `sqrt` builtin can result in double eval vulnerability when the argument has side-effects. It can be seen that the `build_IR` function of the `sqrt` builtin doesn't cache the argument to the stack. As such, it can be evaluated multiple times (instead of retrieving the value from the stack). No vulnerable production contracts were found. Additionally, double evaluation of side-effects should be easily discoverable in client tests. As such, the impact is low. As of time of publication, no fixed versions are available.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/vyper
Introduced in: 0Fixed in: 0.4.0
Fixpip install --upgrade 'vyper>=0.4.0'

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:pypi/vyper"]}'