Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. vyper
  4. ›
  5. CVE-2025-27105

CVE-2025-27105: AugAssign evaluation order causing OOB write within the object in Vyper

February 21, 2025 (updated April 9, 2025)

Vyper handles AugAssign statements by first caching the target location to avoid double evaluation. However, in the case when target is an access to a DynArray and the rhs modifies the array, the cached target will evaluate first, and the bounds check will not be re-evaluated during the write portion of the statement. In other words, the following code

def poc():
a: DynArray[uint256, 2] = [1, 2]
a[1] += a.pop()

is equivalent to:

def poc():
a: DynArray[uint256, 2] = [1, 2]
a[1] += a[len(a) - 1]
a.pop()

rather than:

def poc():
a: DynArray[uint256, 2] = [1, 2]
s: uint256 = a[1]
t: uint256 = a.pop()
a[1] = s + t  # reverts due to oob access

References

  • github.com/advisories/GHSA-4w26-8p97-f4jp
  • github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2025-31.yaml
  • github.com/vyperlang/vyper
  • github.com/vyperlang/vyper/security/advisories/GHSA-4w26-8p97-f4jp
  • nvd.nist.gov/vuln/detail/CVE-2025-27105

Code Behaviors & Features

Detect and mitigate CVE-2025-27105 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.4.1

Fixed versions

  • 0.4.1

Solution

Upgrade to version 0.4.1 or above.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-787: Out-of-bounds Write

Source file

pypi/vyper/CVE-2025-27105.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:16 +0000.