UBUNTU-CVE-2025-24359

Source
https://ubuntu.com/security/CVE-2025-24359
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-24359.json
JSON Data
https://api.test.osv.dev/v1/vulns/UBUNTU-CVE-2025-24359
Related
Published
2025-01-24T17:15:00Z
Modified
2025-01-29T16:32:53Z
Summary
[none]
Details

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.

References

Affected packages

Ubuntu:20.04:LTS / python-asteval

Package

Name
python-asteval
Purl
pkg:deb/ubuntu/python-asteval@0.9.17-1?arch=source&distro=focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.9.12-1
0.9.12-2
0.9.17-1

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:22.04:LTS / python-asteval

Package

Name
python-asteval
Purl
pkg:deb/ubuntu/python-asteval@0.9.25-2?arch=source&distro=jammy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.9.19-2
0.9.25-2

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:24.10 / python-asteval

Package

Name
python-asteval
Purl
pkg:deb/ubuntu/python-asteval@0.9.31-1?arch=source&distro=oracular

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.9.31-1

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:24.04:LTS / python-asteval

Package

Name
python-asteval
Purl
pkg:deb/ubuntu/python-asteval@0.9.31-1?arch=source&distro=noble

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.9.30-1
0.9.31-1

Ecosystem specific

{
    "ubuntu_priority": "medium"
}