Time-of-check Time-of-use (TOCTOU) Race Condition in asteval - #VU162971

 

Time-of-check Time-of-use (TOCTOU) Race Condition in asteval - #VU162971

Published: January 23, 2025 / Updated: November 9, 2026


Vulnerability identifier: #VU162971
CSH Severity: Low
CVSS v4: 8.5 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: N/A
CWE-ID: CWE-367
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows an unprivileged local attacker to escape the asteval sandbox and execute arbitrary Python code in the application's context.

The vulnerability exists due to a time-of-check time-of-use flaw in asteval's attribute access validation when exposed function AST nodes are modified during evaluation. An unprivileged local attacker can supply crafted input that changes an attribute after validation to access restricted Python functionality and execute commands on the host.


Affected software

asteval

Remediation

Install security update from vendor's website.

asteval - update to 1.0.6

External References

Related Security Bulletins