CVE-2025-57697 AstrBot has an arbitrary file read vulnerability in function _encode_image_bs64

Medium 6.5 Published Updated

Attackers can read arbitrary files on the server by manipulating image paths in requests, leading to sensitive data leakage.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-57697?

CVE-2025-57697 is a medium-severity path traversal vulnerability in n/a, published on 7 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

AstrBot Project v3.5.22 has an arbitrary file read vulnerability in function _encode_image_bs64. Since the _encode_image_bs64 function defined in entities.py opens the image specified by the user in the request body and returns the image content as a base64-encoded string without checking the legitimacy of the image path, attackers can construct a series of malicious URLs to read any specified file, resulting in sensitive data leakage.

Weakness: CWE-125

Which versions are affected by CVE-2025-57697?

3 open source packages ship an affected version, including astrbot and AstrBot. It affects 1 product.

PackageAffectedFixed in
astrbot PyPIAll versions to 3.5.22None
astrbot PyPIAll versions to 3.5.22None
AstrBot PyPIAll versions to 3.5.22None

Products include Astrbot Astrbot.

How do I fix CVE-2025-57697?

No fix has been published for CVE-2025-57697 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-57697 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-57697 exists.

Sources

Also known as GHSA-vm2f-46xc-5jc3, PYSEC-2026-1197.

Is CVE-2025-57697 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free