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

CVE-2024-8551

CVE-2024-8551 Path Traversal in Modelscope
📅 PUBLISHED: 2025-03-20 10:10 UTC 🔄 UPDATED: 2026-10-09 05:42 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: 1.00%
👁️
1.00% probability
25.0× above the median CVE
Tier: HIGH
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
9.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-8551 is a critical path traversal vulnerability (CWE-22) in the save-workflow and load-workflow functionalities of the modelscope/agentscope project. With a CVSS score of 9.1, this flaw allows an unauthenticated attacker to read and write arbitrary JSON files on the filesystem. This can lead to the exposure or modification of sensitive information such as configuration files, API keys, and hardcoded passwords. The vulnerability exists in versions prior to a fix, but the exact patched version is currently unknown. No public proof-of-concept (PoC) or exploit code has been released, and the EPSS score is 0.0%, indicating low exploitation activity in the wild. However, the high severity and potential for data breach demand immediate attention.

⚡ 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 package, which is distributed via PyPI. Organizations using this package should verify their version and apply any available patches. The lack of a known patched version increases supply chain risk, as users may unknowingly run vulnerable code. It is crucial to monitor the official repository for updates and consider temporary mitigations.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Base Score: 9.1 (Critical)
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action is required.
  • Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
  • Confidentiality Impact: High (C:H) – Sensitive data can be read.
  • Integrity Impact: High (I:H) – Arbitrary JSON files can be written.
  • Availability Impact: High (A:H) – Potential for denial of service or system compromise.

Threat Level: Critical. The combination of remote exploitability, no authentication, and high impact on confidentiality, integrity, and availability makes this a top-priority vulnerability.

Deep Dive & Mechanics

The vulnerability resides in the save-workflow and load-workflow endpoints of the agentscope application. These endpoints are designed to serialize and deserialize workflow configurations to and from JSON files. The flaw is a classic path traversal (directory traversal) vulnerability, where user-supplied input (likely a filename or path parameter) is not properly sanitized.

Attack Vector: An attacker can craft a request with a path containing ../ sequences to escape the intended workflow directory. For example:

  • save-workflow with a filename like ../../etc/config.json could write arbitrary JSON data to that location.
  • load-workflow with a filename like ../../etc/passwd could read arbitrary files (though the endpoint expects JSON, it may still leak file contents).

Impact:

  • Read Arbitrary JSON Files: An attacker can read configuration files, API keys, database credentials, and other sensitive data stored in JSON format.
  • Write Arbitrary JSON Files: An attacker can overwrite configuration files, inject malicious settings, or plant backdoors. For example, overwriting a configuration file that contains API keys could lead to service compromise.

Root Cause: The application likely uses a function like os.path.join with user input without validating that the resulting path is within an allowed directory. This is a common mistake in Python applications.

Vulnerable vs. Patched Code

Since the exact patched version is unknown, we can only describe the vulnerable pattern and the expected fix.

Vulnerable Code Pattern (Python):

import os
import json

WORKFLOW_DIR = "/app/workflows"

def save_workflow(filename, data):
    filepath = os.path.join(WORKFLOW_DIR, filename)
    with open(filepath, 'w') as f:
        json.dump(data, f)

def load_workflow(filename):
    filepath = os.path.join(WORKFLOW_DIR, filename)
    with open(filepath, 'r') as f:
        return json.load(f)

Patched Code Pattern:

import os
import json

WORKFLOW_DIR = os.path.abspath("/app/workflows")

def safe_path(base, user_path):
    # Resolve the full path and ensure it starts with the base directory
    full_path = os.path.abspath(os.path.join(base, user_path))
    if not full_path.startswith(base):
        raise ValueError("Invalid path")
    return full_path

def save_workflow(filename, data):
    filepath = safe_path(WORKFLOW_DIR, filename)
    with open(filepath, 'w') as f:
        json.dump(data, f)

def load_workflow(filename):
    filepath = safe_path(WORKFLOW_DIR, filename)
    with open(filepath, 'r') as f:
        return json.load(f)

The fix uses os.path.abspath to resolve the full path and then checks that it starts with the allowed base directory. This prevents directory traversal.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Deploy a vulnerable instance of agentscope (version prior to the fix). Use Docker for isolation:

    docker run -d -p 8080:8080 --name agentscope_vuln modelscope/agentscope:latest
    

    (Note: This assumes a vulnerable image exists; otherwise, build from source with an older commit.)

  2. Identify the endpoints. Typically, they might be:

    • POST /api/workflow/save
    • GET /api/workflow/load

Exploitation Steps:

  1. Read Arbitrary JSON File:

    curl -X GET "http://target:8080/api/workflow/load?filename=../../etc/config.json"
    

    If the file is not JSON, the server may return an error, but the content might still be leaked in the error message.

  2. Write Arbitrary JSON File:

    curl -X POST "http://target:8080/api/workflow/save" \
      -H "Content-Type: application/json" \
      -d '{"filename": "../../tmp/backdoor.json", "data": {"malicious": true}}'
    
  3. Overwrite Configuration: If the application uses a JSON config file (e.g., config.json), an attacker could overwrite it to change API keys or other settings.

Blue Team (Defensive)

Detection:

  • Monitor for requests containing ../ or ..%2f in parameters.
  • Alert on attempts to access files outside the expected workflow directory.
  • Use Web Application Firewall (WAF) rules to block path traversal patterns.

Hunting:

  • Search logs for filename parameters containing ../.
  • Check for unexpected file writes in sensitive directories (e.g., /etc, /var/www).

Mitigation:

  • Apply the patch as soon as it becomes available.
  • If patching is not possible, implement input validation to reject paths containing ../ or ..\.
  • Restrict the application's filesystem permissions to only allow writes to the workflow directory.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP requests with filename parameter containing ../ or ..%2f.
    • Unusual POST requests to /api/workflow/save with large JSON payloads.
    • GET requests to /api/workflow/load with suspicious paths.
  • File System IOCs:

    • Unexpected JSON files in /tmp, /etc, or other sensitive directories.
    • Modified configuration files (e.g., config.json) with altered API keys or settings.
  • Log IOCs:

    • Error messages indicating file not found or permission denied for paths outside the workflow directory.
    • Repeated attempts to access ../../etc/passwd or similar files.

Detection Engineering

YARA Rule

rule CVE_2024_8551_Path_Traversal {
    meta:
        description = "Detects path traversal attempts targeting CVE-2024-8551 in agentscope"
        author = "Valters IT"
        date = "2025-03-30"
        reference = "CVE-2024-8551"
    strings:
        $traversal1 = "../" ascii wide
        $traversal2 = "..\\" ascii wide
        $traversal3 = "%2e%2e%2f" ascii wide
        $traversal4 = "%2e%2e%5c" ascii wide
        $endpoint1 = "/api/workflow/save" ascii wide
        $endpoint2 = "/api/workflow/load" ascii wide
    condition:
        any of ($endpoint*) and any of ($traversal*)
}

Sigma Rule

title: CVE-2024-8551 Path Traversal in agentscope
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects path traversal attempts in agentscope save-workflow and load-workflow endpoints
author: Valters IT
date: 2025-03-30
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-8551
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains:
            - '../'
            - '..\\'
            - '%2e%2e%2f'
            - '%2e%2e%5c'
        cs-uri-stem|contains:
            - '/api/workflow/save'
            - '/api/workflow/load'
    condition: selection
falsepositives:
    - Legitimate use of relative paths in non-vulnerable applications
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-8551 Path Traversal in agentscope"; flow:to_server; content:"/api/workflow/save" or content:"/api/workflow/load"; content:"../" or content:"..\\" or content:"%2e%2e%2f" or content:"%2e%2e%5c"; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate Vulnerable Systems: If possible, disconnect the affected service from the network until a patch is applied.
  2. Implement Input Validation: Add server-side validation to reject any filename containing ../ or ..\. Use a whitelist of allowed characters (e.g., alphanumeric and underscores).
  3. Restrict Filesystem Permissions: Ensure the application runs with the least privileges necessary. The workflow directory should be the only writable location.
  4. Monitor Logs: Actively monitor for path traversal attempts using the detection rules above.

Long-Term Fix:

  • Apply the official patch from the modelscope/agentscope repository once released.
  • If no patch is available, consider forking the repository and implementing the fix described in the "Vulnerable vs. Patched Code" section.
  • Conduct a security audit of the entire codebase for similar vulnerabilities.

Workaround:

  • Use a reverse proxy (e.g., Nginx) to block requests containing ../ in the query string:
    if ($args ~* "\.\.") {
        return 403;
    }
    

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-8551/ · 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.