# CVE-2025-24359: python-asteval: ASTEVAL is an evaluator of Python expressions and statements

CVE-2025-24359 is fixed in python-asteval on 1 platform, first by DEBIAN-CVE-2025-24359, released January 24, 2025. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2025-24359
- Priority: High
- CVSS: 8.4 (high)
- EPSS: 0.0028
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jan 24, 2025

## Description

ASTEVAL is an evaluator of Python expressions and statements. Prior to version 1.0.6, if an attacker can control the input to the `asteval` library, they can bypass asteval's restrictions and execute arbitrary Python code in the context of the application using the library. The vulnerability is rooted in how `asteval` performs handling of `FormattedValue` AST nodes. In particular, the `on_formattedvalue` value uses the dangerous format method of the str class. The code allows an attacker to manipulate the value of the string used in the dangerous call `fmt.format(__fstring__=val)`. This vulnerability can be exploited to access protected attributes by intentionally triggering an `AttributeError` exception. The attacker can then catch the exception and use its `obj` attribute to gain arbitrary access to sensitive or protected object properties. Version 1.0.6 fixes this issue.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | python-asteval Debian 13.5 (trixie) | 1.0.6-2 | [DEBIAN-CVE-2025-24359](https://patchblox.com/security/data/fix/linux/debian-cve-2025-24359.md) | Jan 24, 2025 |
| Linux | python-asteval Debian 14 | 1.0.6-2 | [DEBIAN-CVE-2025-24359](https://patchblox.com/security/data/fix/linux/debian-cve-2025-24359.md) | Jan 24, 2025 |
| Linux | python-asteval opensuse-leap 15.6 | 1.0.6-bp156.4.3.1 | [OPENSUSE-SU-2025:0052-1](https://patchblox.com/security/data/fix/linux/opensuse-su-2025-0052-1.md) | Feb 3, 2025 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
