{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-24359","id":"CVE-2025-24359","title":"ASTEVAL Vulnerable to Maliciously Crafted Format Strings Leading to Sandbox Escape","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_formatte","descriptionLong":"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.","published":"2025-01-24T16:52:44.304Z","updated":"2026-10-28T02:30:23.955637219Z","reserved":"2025-01-20T15:18:26.989Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["lmfit asteval"],"affectedProducts":[{"vendor":"lmfit","product":"asteval","defaultStatus":null,"versions":[{"version":"< 1.0.6","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"asteval","purl":"pkg:pypi/asteval","ranges":["<1.0.6"],"fixed":["1.0.6"],"advisory":"GHSA-3wwr-3g9f-9gc7"}],"cwes":["CWE-134","CWE-749"],"aliases":["GHSA-3wwr-3g9f-9gc7","PYSEC-2026-1195"],"references":[{"url":"https://github.com/lmfit/asteval/security/advisories/GHSA-3wwr-3g9f-9gc7","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/lmfit/asteval/blob/cfb57f0beebe0dc0520a1fbabc35e66060c7ea71/asteval/asteval.py#L507","tags":["x_refsource_MISC","web"]},{"url":"https://lucumr.pocoo.org/2016/12/29/careful-with-str-format","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/24xxx/CVE-2025-24359.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-24359","tags":["advisory"]},{"url":"https://github.com/lmfit/asteval/commit/45bb47533f7abb5479618ae7f6a809215700dcb2","tags":["web"]},{"url":"https://github.com/lmfit/asteval","tags":["package"]},{"url":"https://pypi.org/project/asteval","tags":["package"]},{"url":"https://github.com/advisories/GHSA-3wwr-3g9f-9gc7","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00278,"epssPercentile":0.20591,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-24359","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-24359","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-24359","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3wwr-3g9f-9gc7","ok":true,"note":"GHSA-3wwr-3g9f-9gc7"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-24359","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}