CVE-2025-57697
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
AstrBot v3.5.22 has an arbitrary file read in _encode_image_bs64, allowing attackers to read any file via a malicious image path.
Vulnerability
Description
The arbitrary file read vulnerability exists in AstrBot Project v3.5.22, specifically within the _encode_image_bs64 function defined in entities.py. This function opens an image file specified by the user in the request body and returns its content as a base64-encoded string, but it does not validate the legitimacy of the provided image path [1][3]. This allows an attacker to supply a malicious path pointing to any file on the server.
Attack
Vector
The vulnerability can be exploited remotely without authentication. An attacker constructs a crafted request containing a file URL (e.g., using file:///etc/passwd or similar) as the image_url parameter. The _encode_image_bs64 function reads the file at that path and returns its contents as a base64 string. This string is then stored in the conversation history within a SQLite database, making the leaked data accessible [1]. The attack requires only the ability to send a request to the AstrBot service (e.g., via the webchat interface or other supported platforms).
Impact
Successful exploitation leads to disclosure of sensitive server files, such as configuration files, credentials, or other confidential data stored on the server. This can result in further compromise of the system or data breaches [3].
Mitigation
As of the latest version (v3.5.22), the vulnerability remains unpatched. Users should monitor the official AstrBot repository [2] for updates and apply patches as soon as they become available. In the interim, restricting access to the AstrBot instance and implementing input validation on image paths can reduce risk.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
AstrBotPyPI | <= 3.5.22 | — |
Affected products
2- AstrBot/AstrBot Projectdescription
- Range: = 3.5.22
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3News mentions
0No linked articles in our index yet.