---
id: CVE-2021-41121
aliases:
  - GHSA-xv8x-pr4h-73jv
  - PYSEC-2021-365
title: >-
  Memory corruption when returning a literal struct with a private call inside
  of it
summary: >-
  Memory corruption when returning a literal struct with a private call inside
  of it
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'
vendor: vyper
product: vyper
ecosystem: pip
affected:
  - vyper < 0.3.0
patched:
  - vyper 0.3.0
published: '2021-10-12'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-xv8x-pr4h-73jv'
references:
  - url: 'https://github.com/vyperlang/vyper/security/advisories/GHSA-xv8x-pr4h-73jv'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-41121'
  - url: 'https://github.com/vyperlang/vyper/pull/2447'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2021-365.yaml
  - url: 'https://github.com/vyperlang/vyper'
tags:
  - osv
  - pip
epss: 0.01074
epssPercentile: 0.63521
ingestedAt: '2026-07-08T18:25:54.688Z'
---

## Overview

### Impact

When performing a function call inside a literal struct, there is a memory corruption issue that occurs because of an incorrect pointer to the the top of the stack.

### Patches
0.3.0 / #2447

*

## Affected packages

- `vyper < 0.3.0`

## Remediation

Upgrade to a patched release:

- `vyper 0.3.0`
