---
id: CVE-2021-41122
aliases:
  - GHSA-c7pr-343r-5c46
  - PYSEC-2021-366
title: missing clamps for decimal args in external functions
summary: missing clamps for decimal args in external functions
severity: medium
cvss: 4.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N'
vendor: vyper
product: vyper
ecosystem: pip
affected:
  - vyper < 0.3.0
patched:
  - vyper 0.3.0
published: '2021-10-06'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-c7pr-343r-5c46'
references:
  - url: 'https://github.com/vyperlang/vyper/security/advisories/GHSA-c7pr-343r-5c46'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-41122'
  - url: 'https://github.com/vyperlang/vyper/pull/2447'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2021-366.yaml
  - url: 'https://github.com/vyperlang/vyper'
tags:
  - osv
  - pip
epss: 0.00803
epssPercentile: 0.54781
ingestedAt: '2026-07-08T18:25:48.334Z'
---

## Overview

### Impact

The following code does not properly validate that its input is in bounds.

```python
@external
def foo(x: decimal) -> decimal:
    return x
```

### Patches
0.3.0 / #2447

### Workarounds
Don't use decimal args



## Affected packages

- `vyper < 0.3.0`

## Remediation

Upgrade to a patched release:

- `vyper 0.3.0`
