CVE-2025-48957: Astrbot Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-cq37-g2qp-3c2p
CVSS 7.5
CWE-23
Published
Advisory Summary

CVE-2025-48957 is a HIGH (CVSS 7.5) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Astrbot libraries in the PyPI ecosystem. The issue involves astrbot has path traversal vulnerability in /api/chat/get_file. Remediation is available by upgrading affected packages to version 3.5.13.

CVE-2025-48957 at a Glance

CVE Identifier CVE-2025-48957
GHSA Identifier GHSA-cq37-g2qp-3c2p
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-23: Relative Path Traversal
Affected Product Astrbot
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-48957

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: 3.5.13
pip install astrbot>=3.5.13
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-48957, 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 3.5.13), 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-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. 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

### 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: ```bash pip install uv git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot uv run main.py ``` 2. Alternatively, deploy the program via pip: ```bash mkdir astrbot && cd astrbot uvx astrbot init uvx astrbot run ``` 3. In another terminal, run the following command to exploit the vulnerability: ```bash 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](https://github.com/AstrBotDevs/AstrBot/pull/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 * [Pull Request #1676](https://github.com/AstrBotDevs/AstrBot/pull/1676) * [Issue #1675](https://github.com/AstrBotDevs/AstrBot/issues/1675)

CVE-2025-48957 Affected Astrbot Versions

1 component(s)
Fixed Versions:
3.5.13
Product / Package Ecosystem Affected Versions Fixed Version
astrbot
PyPI
≥ 3.4.4
< 3.5.13
3.5.13

References

Frequently Asked Questions

What is CVE-2025-48957?
CVE-2025-48957 is a security vulnerability in Astrbot involving AstrBot Has Path Traversal Vulnerability in /api/chat/get_file under CWE-23: Relative Path Traversal.
Which Astrbot versions are affected?
Affected versions include releases prior to 3.5.13 across affected packages: astrbot.
What version fixes CVE-2025-48957?
Upgrading to 3.5.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is astrbot affected?
Yes, astrbot is affected in releases prior to 3.5.13. Upgrade your dependency to 3.5.13 or later.
What is the CVSS score of CVE-2025-48957?
CVE-2025-48957 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2025-48957?
CVE-2025-48957 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check PyPI dependencies for CVE-2025-48957?
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-cq37-g2qp-3c2p",
  "modified" : "2025-06-27T22:09:44Z",
  "published" : "2025-06-04T23:54:35Z",
  "aliases" : [ "CVE-2025-48957" ],
  "summary" : "AstrBot Has Path Traversal Vulnerability in /api/chat/get_file",
  "details" : "### Impact\n\nThis vulnerability may lead to:\n\n* Information disclosure, such as API keys for LLM providers, account passwords, and other sensitive data.\n\n### Reproduce\n\nFollow these steps to set up a test environment for reproducing the vulnerability:\n\n1. Install dependencies and clone the repository:\n\n   ```bash\n   pip install uv\n   git clone https://github.com/AstrBotDevs/AstrBot && cd AstrBot\n   uv run main.py\n   ```\n\n2. Alternatively, deploy the program via pip:\n\n   ```bash\n   mkdir astrbot && cd astrbot\n   uvx astrbot init\n   uvx astrbot run\n   ```\n\n3. In another terminal, run the following command to exploit the vulnerability:\n\n   ```bash\n   curl -L http://0.0.0.0:6185/api/chat/get_file?filename=../../../data/cmd_config.json\n   ```\n\nThis 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).\n\n### Patches\n\nThe vulnerability has been addressed in [Pull Request #1676](https://github.com/AstrBotDevs/AstrBot/pull/1676) and is included in versions >= v3.5.13. All users are strongly encouraged to upgrade to v3.5.13 or later.\n\n### Workarounds\nUsers 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.\n\n### References\n\n* [Pull Request #1676](https://github.com/AstrBotDevs/AstrBot/pull/1676)\n* [Issue #1675](https://github.com/AstrBotDevs/AstrBot/issues/1675)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "astrbot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.4"
      }, {
        "fixed" : "3.5.13"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.5.12"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AstrBotDevs/AstrBot/security/advisories/GHSA-cq37-g2qp-3c2p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48957"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AstrBotDevs/AstrBot/issues/1675"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AstrBotDevs/AstrBot/pull/1676"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AstrBotDevs/AstrBot/commit/cceadf222c46813c7f41115b40d371e7eb91e492"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AstrBotDevs/AstrBot"
  }, {
    "type" : "WEB",
    "url" : "https://www.vicarius.io/vsociety/posts/cve-2025-48957-detect-astrbot-dashboard-vulnerability?prevUrl=wizard"
  }, {
    "type" : "WEB",
    "url" : "https://www.vicarius.io/vsociety/posts/cve-2025-48957-mitigate-astrbot-dashboard-vulnerability?prevUrl=wizard"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-23" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-04T23:54:35Z",
    "nvd_published_at" : "2025-06-02T12:15:25Z"
  }
}