CVE-2025-57697: AstrBot AstrBot Has An Arbitrary File Vulnerability

MODERATE
Advisory Identifier: GHSA-vm2f-46xc-5jc3
CWE-125 CWE-22
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2025-57697
GHSA Identifier GHSA-vm2f-46xc-5jc3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-125: Out-of-bounds Read
Affected Product AstrBot
Package Ecosystem PyPI
Published Date
Last Updated

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.

AstrBot fixed: Latest secure release
pip install AstrBot>=Latest secure release
Verify Direct and Transitive Dependencies

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

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.

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?
CVE-2025-57697 is a security vulnerability in AstrBot involving AstrBot has an arbitrary file read vulnerability in function _encode_image_bs64 under CWE-125: Out-of-bounds Read.
Which AstrBot versions are affected?
Affected versions include releases prior to current release patches across affected packages: AstrBot.
What version fixes CVE-2025-57697?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is AstrBot affected?
Yes, AstrBot is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-57697?
CVE-2025-57697 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check PyPI dependencies for CVE-2025-57697?
Run the dependency tree command: 'pip show AstrBot'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}