---
id: CVE-2025-57697
aliases:
  - GHSA-vm2f-46xc-5jc3
  - PYSEC-2026-1197
title: >-
  AstrBot has an arbitrary file read vulnerability in function
  _encode_image_bs64
summary: >-
  AstrBot has an arbitrary file read vulnerability in function
  _encode_image_bs64
severity: medium
vendor: astrbot
product: astrbot
ecosystem: pip
affected:
  - astrbot <= 3.5.22
published: '2025-11-07'
updated: '2026-07-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-vm2f-46xc-5jc3'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-57697'
  - url: 'https://github.com/AstrBotDevs/AstrBot'
  - url: 'https://github.com/DYX217/vulnerability-explore/blob/main/1/README.md'
tags:
  - osv
  - pip
epss: 0.00318
epssPercentile: 0.24928
ingestedAt: '2026-07-08T18:25:53.333Z'
---

## Overview

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.

## Affected packages

- `astrbot <= 3.5.22`

## Remediation

Refer to the advisory for the patched release.
