# CVE-2024-8438: ModelScope AgentScope path traversal in /api/file

Source: https://junglewise.ai/threats/cve-2024-8438-modelscope-agentscope-path-traversal-in-api-file  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-03-20. Updated: 2026-06-05  
License: CC BY 4.0 with a link back

CVE-2024-8438 · Severity: high · CVSS 7.5 · Published 2025-03-20

AgentScope is a framework used to build multi-agent applications powered by large language models. A security flaw in its file management interface allows an attacker to bypass directory restrictions and read any file on the host server. This could lead to the theft of sensitive configuration data, credentials, or private application files, potentially compromising the entire server.

Technologies: [agentscope (PyPI)](https://junglewise.ai/threats/technologies/agentscope). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-8438 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-8438 being exploited in the wild.

**How severe is CVE-2024-8438?** High severity, with a CVSS score of 7.5, published 20 March 2025.

**Which products and versions are affected?** agentscope (PyPI) <= 0.0.4, ECOSYSTEM:introduced=0,last_affected=0.0.4.

**Is there a fix for CVE-2024-8438?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2024-8438 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2024-8438?** Check whether you run agentscope (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A path traversal vulnerability (CWE-22) exists in ModelScope AgentScope version 0.0.4 and earlier. The vulnerability is located in the `/api/file` endpoint within the `src/agentscope/studio/_app.py` component. The application fails to properly sanitize the `path` parameter, allowing an attacker to use dot-dot-slash (`../`) sequences to escape the intended directory. An unauthenticated remote attacker can exploit this to read arbitrary files from the underlying filesystem with the privileges of the application process. As of the advisory date, no patched version has been identified.

## Affected products

- ModelScope AgentScope <= 0.0.4

## Identifiers

- CVE-2024-8438
- GHSA-f4hc-q562-cc5r
- PYSEC-2025-80

## Timeline

- 2025-03-20: disclosed
- 2025-03-20: advisory

## References

- [https://huntr.com/bounties/3f170c58-42ee-422d-ab6f-32c7aa05b974](https://huntr.com/bounties/3f170c58-42ee-422d-ab6f-32c7aa05b974)
- [https://github.com/modelscope/agentscope/blob/af8e45ded37b3834c981473b309239e0102473d0/src/agentscope/studio/_app.py](https://github.com/modelscope/agentscope/blob/af8e45ded37b3834c981473b309239e0102473d0/src/agentscope/studio/_app.py)
- [https://github.com/pypa/advisory-database/tree/main/vulns/agentscope/PYSEC-2025-80.yaml](https://github.com/pypa/advisory-database/tree/main/vulns/agentscope/PYSEC-2025-80.yaml)

## Related threats

- [PYSEC-2026-1076 - AgentScope stored cross-site scripting (XSS) vulnerability](https://junglewise.ai/threats/cve-2024-8556-agentscope-stored-cross-site-scripting-xss-vulnerability)
- [AgentScope vulnerable to Server-Side Request Forgery](https://junglewise.ai/threats/cve-2026-6606-agentscope-vulnerable-to-server-side-request-forgery)
- [AgentScope vulnerable to Server-Side Request Forgery](https://junglewise.ai/threats/cve-2026-6605-agentscope-vulnerable-to-server-side-request-forgery)
- [AgentScope vulnerable to Server-Side Request Forgery](https://junglewise.ai/threats/cve-2026-6604-agentscope-vulnerable-to-server-side-request-forgery)
- [PYSEC-2026-2331 - AgentScope Vulnerable to Remote Code Injection](https://junglewise.ai/threats/cve-2026-6603-agentscope-vulnerable-to-remote-code-injection)
