asteval sandbox escape: arbitrary native memory read/write via numpy ctypes in default asteval Interpreter
asteval is a Python expression evaluator designed for restricted execution. Prior to 1.0.9, in asteval/astutils.py, the default Interpreter with numpy enabled exposes a ctypes type and permits from_address memory access. safe_getattr blocks the ctypes module but not reachable ctypes type objects, while attribute assignments use unfiltered setattr instead of safe_setattr. An attacker-controlled expression can derive an address with id, read memory through from_address, and write through an attribute assignment. The expression can read or corrupt arbitrary process memory, escape the intended sandbox, execute code, disclose secrets, or crash the host process. This issue is fixed in version 1.0.9.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-102734
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 16:29 UTC · Revision 1
Source evidence
asteval sandbox escape: arbitrary native memory read/write via numpy ctypes in default asteval Interpreter
core-osv · Original sourcePublished 13 Oct 2026, 15:29 UTC
asteval is a Python expression evaluator designed for restricted execution. Prior to 1.0.9, in asteval/astutils.py, the default Interpreter with numpy enabled exposes a ctypes type and permits from_address memory access. safe_getattr blocks the ctypes module but not reachable ctypes type objects, while attribute assignments use unfiltered setattr instead of safe_setattr. An attacker-controlled expression can derive an address with id, read memory through from_address, and write through an attribute assignment. The expression can read or corrupt arbitrary process memory, escape the intended sandbox, execute code, disclose secrets, or crash the host process. This issue is fixed in version 1.0.9.
osv:CVE-2026-102734
Complete source record
{
"id": "4551bf8cf83480ee4e7b4ca9c97ff76af8b937ab51a59ae52d2fcaa8dea07cd6",
"url": "https://osv.dev/vulnerability/CVE-2026-102734",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "asteval sandbox escape: arbitrary native memory read/write via numpy ctypes in default asteval Interpreter",
"summary": "asteval is a Python expression evaluator designed for restricted execution. Prior to 1.0.9, in asteval/astutils.py, the default Interpreter with numpy enabled exposes a ctypes type and permits from_address memory access. safe_getattr blocks the ctypes module but not reachable ctypes type objects, while attribute assignments use unfiltered setattr instead of safe_setattr. An attacker-controlled expression can derive an address with id, read memory through from_address, and write through an attribute assignment. The expression can read or corrupt arbitrary process memory, escape the intended sandbox, execute code, disclose secrets, or crash the host process. This issue is fixed in version 1.0.9.",
"evidence": "osv:CVE-2026-102734",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-102734",
"aliases": [
"CVE-2026-102734",
"GHSA-9w56-46f6-3qhx"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/lmfit/asteval",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "0b359d0b03195d1288af656e98730ab691b04f5a"
},
{
"fixed": "a3e56e7f8ed567a4817684d94213b290359077b4"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.0.9"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "a3e56e7f8ed567a4817684d94213b290359077b4"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "0b359d0b03195d1288af656e98730ab691b04f5a"
}
],
"source": "REFERENCES_TAG",
"original_tag": "1.0.9"
}
]
}
}
],
"versions": [
"1.0.8",
"1.0.7",
"1.0.6",
"1.0.5",
"1.0.4",
"1.0.3",
"1.0.2",
"1.0.1",
"1.0.0",
"0.9.33",
"0.9.32",
"0.9.31",
"0.9.30",
"0.9.29",
"0.9.28",
"0.9.27",
"0.9.26",
"0.9.25",
"0.9.24",
"0.9.23",
"0.9.22",
"0.9.21",
"0.9.20",
"0.9.19",
"0.9.18",
"0.9.17",
"0.9.16",
"0.9.15",
"0.9.14",
"0.9.13",
"0.9.12",
"0.9.11",
"0.9.10",
"0.9.9",
"0.9.7",
"0.9.6",
"0.9.5",
"0.9.4",
"0.9.3.1",
"0.9.3",
"0.9.2",
"0.9.1",
"0.9"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-102734.json"
}
}
],
"modified": "2026-10-28T02:30:30.454537415Z",
"provider": "osv",
"references": [
"https://github.com/lmfit/asteval/releases/tag/1.0.9",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102734.json",
"https://github.com/lmfit/asteval/security/advisories/GHSA-9w56-46f6-3qhx",
"https://nvd.nist.gov/vuln/detail/CVE-2026-102734",
"https://github.com/lmfit/asteval/commit/a3e56e7f8ed567a4817684d94213b290359077b4",
"https://github.com/lmfit/asteval/pull/153"
],
"provider_metadata": {
"cwe_ids": [
"CWE-693",
"CWE-749",
"CWE-913"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102734.json"
}
},
"related_cves": [
{
"value": "CVE-2026-102734",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497366,
"published_at": "2026-10-13T15:29:49.209+00:00"
}