{"id":"CVE-2021-48019","aliases":["CVE-2021-48019","GHSA-375m-5fvv-xq23"],"related":[],"kind":"vulnerability","state":"published","title":"Vyper before 0.2.9 Incorrect RETURNDATASIZE in create_forwarder_to Proxies","summary":"Vyper before 0.2.9 deploys forwarder proxies through the built-in create_forwarder_to function that report a fixed 4096-byte RETURNDATASIZE rather than the actual return data size. Calls through these proxies can yield corrupted data when a function returns more than 4096 bytes without return data sanitation, and fail strict return-size checks such as SafeERC20.safeTransfer.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vyper before 0.2.9 deploys forwarder proxies through the built-in create_forwarder_to function that report a fixed 4096-byte RETURNDATASIZE rather than the actual return data size. Calls through these proxies can yield corrupted data when a function returns more than 4096 bytes without return data sanitation, and fail strict return-size checks such as SafeERC20.safeTransfer.","source":"cvelist"},{"lang":"en","text":"## Background\n\n@tjayrush reported a data handling issue with certain Web3 libraries using Vyper-deploy forwarder proxy contracts using our Vyper's built-in `create_forwarder_to` function prior to our change to support EIP-1167 style forwarder proxies.\n\n### Impact\nIf you are an end user of a forwarder-style proxy deployed using Vyper's built-in `create_forwarder_to` function AND you have a function that returns >4096 bytes AND you do no return data sanitation on the value returned, you could potentially see a data corruption issue.\n\nOtherwise, if you are handling the result of a return call AND you expect a specific `RETURNDATASIZE` that is less than 4096 (such as `SafeERC20.safeTransfer`) then the call will fail that check.\n\n### Patches\nThe issue was patched when we upgraded to EIP-1167 style forwarder proxies in #2281.\n\n### Workarounds\nIf you are making a call to a contract method that is expected to return <= 4096 bytes, there is no issue as the ABI decoders in both Solidity and Vyper will truncate the data properly. Web3 libraries will also do this, unless you are doing `eth_call` or `eth_sendTransaction` directly.\n\nIf you are using a Solidity library that checks `RETURNDATASIZE` of an external call to a forwarder proxy deployed prior to this patch, it will fail on that assertion (such as `SafeERC20.safeTransfer`). The workaround is to always do a greater than or equal to check, rather than a strict equals to check.","format":"markdown","source":"ghsa"}],"published":"2021-04-19T15:11:54.000Z","modified":"2026-10-27T22:17:08.050Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","score":4.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"rating","rating":"LOW"}],"cwes":["CWE-20","CWE-805"],"affected":[{"ranges":[{"type":"python","introduced":"0","fixed":"0.2.9","status":"affected"},{"type":"python","version":"0.2.9","status":"unaffected"}],"vendor":"vyperlang","product":"vyper","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.2.9"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"ghsa"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-375m-5fvv-xq23","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/vyper-before-0.2.9-incorrect-returndatasize-in-create-forwarder-to-proxies","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/vyperlang/vyper/pull/2281","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/vyper","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-27T21:35:49.406Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-48019","url":"https://www.cve.org/CVERecord?id=CVE-2021-48019","licence":"CVE Terms of Use","modified":"2026-10-27T21:35:59.282Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-375m-5fvv-xq23","url":"https://github.com/advisories/GHSA-375m-5fvv-xq23","licence":"CC-BY-4.0","modified":"2026-10-24T02:56:08.111Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-48019","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-48019","licence":"Public domain","modified":"2026-10-27T22:17:08.050Z"}],"updatedAt":"2026-11-25T22:58:09.125Z","epss":{"score":0.00302,"percentile":0.24757,"date":"2026-12-01T12:00:22.000Z"}}