CVE-2025-57697: AstrBot AstrBot Has An Arbitrary File Vulnerability
MODERATECVE-2025-57697 is a MODERATE astrbot has an arbitrary file vulnerability (CWE-125: Out-of-bounds Read) affecting AstrBot libraries in the PyPI ecosystem. The issue involves astrbot has an arbitrary file read vulnerability in function _encode_image_bs64. Remediation is available in the latest vendor maintenance releases.
CVE-2025-57697 at a Glance
How to Fix CVE-2025-57697
To remediate this vulnerability, upgrade all affected AstrBot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install AstrBot>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show AstrBot
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-57697, inspect your installed packages using pip:
pip show AstrBot
Analyze the terminal output to locate any version of AstrBot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show AstrBot command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In AstrBot, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-57697 Affected AstrBot Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
AstrBot
|
PyPI |
≤ 3.5.22
|
|
References
Frequently Asked Questions
What is CVE-2025-57697?
Which AstrBot versions are affected?
What version fixes CVE-2025-57697?
Is AstrBot affected?
What CWE is associated with CVE-2025-57697?
How can I check PyPI dependencies for CVE-2025-57697?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vm2f-46xc-5jc3",
"modified" : "2025-11-07T20:50:54Z",
"published" : "2025-11-07T18:30:31Z",
"aliases" : [ "CVE-2025-57697" ],
"summary" : "AstrBot has an arbitrary file read vulnerability in function _encode_image_bs64",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "AstrBot"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.5.22"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57697"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/AstrBotDevs/AstrBot"
}, {
"type" : "WEB",
"url" : "https://github.com/DYX217/vulnerability-explore/blob/main/1/README.md"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125", "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-07T20:50:54Z",
"nvd_published_at" : "2025-11-07T18:15:36Z"
}
}