CVE-2025-27105: Vyper AugAssign Evaluation Order Causing OOB Vulnerability
LOWCVE-2025-27105 is a LOW augassign evaluation order causing oob vulnerability (CWE-787: Out-of-bounds Write) affecting Vyper libraries in the PyPI ecosystem. The issue involves augassign evaluation order causing oob write within the object in vyper. Remediation is available by upgrading affected packages to version 0.4.1.
CVE-2025-27105 at a Glance
How to Fix CVE-2025-27105
To remediate this vulnerability, upgrade all affected Vyper dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install vyper>=0.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show vyper
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-27105, inspect your installed packages using pip:
pip show vyper
Analyze the terminal output to locate any version of Vyper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.1), your application is affected.
Note: The pip show vyper command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Vyper, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-27105 Affected Vyper Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vyper
|
PyPI |
< 0.4.1
|
0.4.1
|
References
Frequently Asked Questions
What is CVE-2025-27105?
Which Vyper versions are affected?
What version fixes CVE-2025-27105?
Is vyper affected?
What CWE is associated with CVE-2025-27105?
How can I check PyPI dependencies for CVE-2025-27105?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4w26-8p97-f4jp",
"modified" : "2025-04-09T20:14:00Z",
"published" : "2025-02-21T22:43:33Z",
"aliases" : [ "CVE-2025-27105" ],
"summary" : "AugAssign evaluation order causing OOB write within the object in Vyper",
"details" : "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\n\n```vyper\ndef poc():\n a: DynArray[uint256, 2] = [1, 2]\n a[1] += a.pop()\n```\n\nis equivalent to:\n```vyper\ndef poc():\n a: DynArray[uint256, 2] = [1, 2]\n a[1] += a[len(a) - 1]\n a.pop()\n```\nrather than:\n```vyper\ndef poc():\n a: DynArray[uint256, 2] = [1, 2]\n s: uint256 = a[1]\n t: uint256 = a.pop()\n a[1] = s + t # reverts due to oob access\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "vyper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.4.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vyperlang/vyper/security/advisories/GHSA-4w26-8p97-f4jp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-27105"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2025-31.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vyperlang/vyper"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-02-21T22:43:33Z",
"nvd_published_at" : "2025-02-21T22:15:13Z"
}
}