CVE-2025-55013: Assemblyline service client Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-75jv-vfxf-3865
CVSS 4.2
CWE-23
Published
Advisory Summary

CVE-2025-55013 is a MODERATE (CVSS 4.2) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Assemblyline service client libraries in the PyPI ecosystem. The issue involves assemblyline 4 service client vulnerable to arbitrary write through path traversal in client code. Remediation is available by upgrading affected packages to version 4.6.0.stable11, 4.6.1.dev138.

CVE-2025-55013 at a Glance

CVE Identifier CVE-2025-55013
GHSA Identifier GHSA-75jv-vfxf-3865
Severity MODERATE
CVSS v3.1 Base Score 4.2
CWE Classification CWE-23: Relative Path Traversal
Affected Product Assemblyline service client
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.2

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

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

How to Fix CVE-2025-55013

To remediate this vulnerability, upgrade all affected Assemblyline service client dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

assemblyline-service-client fixed: 4.6.0.stable11
pip install assemblyline-service-client>=4.6.0.stable11
assemblyline-service-client fixed: 4.6.1.dev138
pip install assemblyline-service-client>=4.6.1.dev138
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 assemblyline-service-client

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-55013, inspect your installed packages using pip:

pip show assemblyline-service-client

Analyze the terminal output to locate any version of Assemblyline service client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.0.stable11), your application is affected.

Note: The pip show assemblyline-service-client 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 Assemblyline service client, 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

**Path-Traversal -> Arbitrary File Write in Assemblyline Service Client** **IMPORTANT**: This vulnerability is valid if you decide to use the assemblyline-service-client outside of the normal practice to using Assemblyline in a production environment. In practice, this code should always be executed within a containerized environment such as [assemblyline-v4-service](https://github.com/CybercentreCanada/assemblyline-v4-service) which ensures filesystem-level permissions of what the running user is allowed to access. Furthermore, there is fewer chances for a MiTM compromise when deployed properly in a Docker or Kubernetes deployment where the platform will assign the correct network policies to secure connections between containers instead of relying on the user to set this up manually. See https://github.com/CybercentreCanada/assemblyline/issues/382 for further discussion. --- ## 1. Summary The Assemblyline 4 **service client** (`task_handler.py`) accepts a SHA-256 value returned by the service **server** and uses it directly as a local file name. > No validation / sanitisation is performed. A **malicious or compromised server** (or any MITM that can speak to client) can return a path-traversal payload such as `../../../etc/cron.d/evil` and force the client to write the downloaded bytes to an arbitrary location on disk. --- ## 2. Affected Versions | Item | Value | |---|---| | **Component** | `assemblyline-service-client` | | **Repository** | [CybercentreCanada/assemblyline-service-client](https://github.com/CybercentreCanada/assemblyline-service-client) | | **Affected** | **All releases up to master branch.** | --- ## 3. CVSS 3.1 Vector & Score ``` CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L ``` --- ## 4. Technical Details | Field | Content | |---|---| | **Location** | `assemblyline_service_client/task_handler.py`, inside `download_file()` | | **Vulnerable Line** | `file_path = os.path.join(self.tasking_dir, sha256)` | | **Root Cause** | The `sha256` string is taken directly from the service-server JSON response and used as a file name without any validation or sanitisation. | | **Exploit Flow** | 1. Attacker (service server) returns HTTP 200 for `GET /api/v1/file/../../../etc/cron.d/evil`.<br>2. Client writes the response body to `/etc/cron.d/evil`.<br>3. Achieves arbitrary file write (code execution if file is executable). | --- ## 5. Impact - **Integrity** – Overwrite any file writable by the service UID (often root). - **Availability** – Corrupt critical files or exhaust disk space. - **Code Execution** – Drop cron jobs, systemd units, or overwrite binaries. --- ## 6. Mitigation / Fix ```python import re _SHA256_RE = re.compile(r'^[0-9a-fA-F]{64}\Z') def download_file(self, sha256: str, sid: str) -> Optional[str]: if not _SHA256_RE.fullmatch(sha256): self.log.error(f"[{sid}] Invalid SHA256: {sha256}") self.status = STATUSES.ERROR_FOUND return None # or your preferred way to check if a string is a shasum. ``` ---

CVE-2025-55013 Affected Assemblyline service client Versions

2 component(s)
Fixed Versions:
4.6.0.stable114.6.1.dev138
Product / Package Ecosystem Affected Versions Fixed Version
assemblyline-service-client
PyPI
< 4.6.0.stable11
4.6.0.stable11
assemblyline-service-client
PyPI
≥ 4.6.1.dev0
< 4.6.1.dev138
4.6.1.dev138

References

Frequently Asked Questions

What is CVE-2025-55013?
CVE-2025-55013 is a security vulnerability in Assemblyline service client involving Assemblyline 4 service client vulnerable to Arbitrary Write through path traversal in Client code under CWE-23: Relative Path Traversal.
Which Assemblyline service client versions are affected?
Affected versions include releases prior to 4.6.0.stable11, 4.6.1.dev138 across affected packages: assemblyline-service-client.
What version fixes CVE-2025-55013?
Upgrading to 4.6.0.stable11, 4.6.1.dev138 (or the latest patched release for your respective branch) resolves the vulnerability.
Is assemblyline-service-client affected?
Yes, assemblyline-service-client is affected in releases prior to 4.6.0.stable11, 4.6.1.dev138. Upgrade your dependency to 4.6.0.stable11, 4.6.1.dev138 or later.
What is the CVSS score of CVE-2025-55013?
CVE-2025-55013 has a CVSS v3.1 base score of 4.2 (MODERATE) with vector string CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2025-55013?
CVE-2025-55013 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-55013?
Run the dependency tree command: 'pip show assemblyline-service-client'. 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-75jv-vfxf-3865",
  "modified" : "2025-08-12T13:26:14Z",
  "published" : "2025-07-25T14:15:48Z",
  "aliases" : [ "CVE-2025-55013" ],
  "summary" : "Assemblyline 4 service client vulnerable to Arbitrary Write through path traversal in Client code ",
  "details" : "**Path-Traversal -> Arbitrary File Write in Assemblyline Service Client**\n\n**IMPORTANT**: This vulnerability is valid if you decide to use the assemblyline-service-client outside of the normal practice to using Assemblyline in a production environment. In practice, this code should always be executed within a containerized environment such as [assemblyline-v4-service](https://github.com/CybercentreCanada/assemblyline-v4-service) which ensures filesystem-level permissions of what the running user is allowed to access. Furthermore, there is fewer chances for a MiTM compromise when deployed properly in a Docker or Kubernetes deployment where the platform will assign the correct network policies to secure connections between containers instead of relying on the user to set this up manually.\n\nSee https://github.com/CybercentreCanada/assemblyline/issues/382 for further discussion.\n\n---\n\n## 1. Summary  \nThe Assemblyline 4 **service client** (`task_handler.py`) accepts a SHA-256 value returned by the service **server** and uses it directly as a local file name.  \n> No validation / sanitisation is performed.\n\nA **malicious or compromised server** (or any MITM that can speak to client) can return a path-traversal payload such as  \n`../../../etc/cron.d/evil`  \nand force the client to write the downloaded bytes to an arbitrary location on disk.\n\n---\n\n## 2. Affected Versions  \n| Item | Value |\n|---|---|\n| **Component** | `assemblyline-service-client` |\n| **Repository** | [CybercentreCanada/assemblyline-service-client](https://github.com/CybercentreCanada/assemblyline-service-client) |\n| **Affected** | **All releases up to master branch.**  |\n\n\n---\n\n## 3. CVSS 3.1 Vector & Score  \n```\nCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L\n```\n\n\n---\n\n## 4. Technical Details\n\n| Field | Content |\n|---|---|\n| **Location** | `assemblyline_service_client/task_handler.py`, inside `download_file()` |\n| **Vulnerable Line** | `file_path = os.path.join(self.tasking_dir, sha256)` |\n| **Root Cause** | The `sha256` string is taken directly from the service-server JSON response and used as a file name without any validation or sanitisation. |\n| **Exploit Flow** | 1. Attacker (service server) returns HTTP 200 for `GET /api/v1/file/../../../etc/cron.d/evil`.<br>2. Client writes the response body to `/etc/cron.d/evil`.<br>3. Achieves arbitrary file write (code execution if file is executable). |\n\n---\n\n## 5. Impact  \n- **Integrity** – Overwrite any file writable by the service UID (often root).  \n- **Availability** – Corrupt critical files or exhaust disk space.  \n- **Code Execution** – Drop cron jobs, systemd units, or overwrite binaries.\n\n---\n\n## 6. Mitigation / Fix\n\n```python\nimport re\n\n_SHA256_RE = re.compile(r'^[0-9a-fA-F]{64}\\Z')\n\ndef download_file(self, sha256: str, sid: str) -> Optional[str]:\n    if not _SHA256_RE.fullmatch(sha256):\n        self.log.error(f\"[{sid}] Invalid SHA256: {sha256}\")\n        self.status = STATUSES.ERROR_FOUND\n        return None\n    # or your preferred way to check if a string is a shasum.\n```\n---",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "assemblyline-service-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.0.stable11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "assemblyline-service-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.6.1.dev0"
      }, {
        "fixed" : "4.6.1.dev138"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/CybercentreCanada/assemblyline/security/advisories/GHSA-75jv-vfxf-3865"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-55013"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/CybercentreCanada/assemblyline-service-client/commit/351414e7e96cc1f5640ae71ae51b939e8ba30900"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/CybercentreCanada/assemblyline-service-client"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-23" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-25T14:15:48Z",
    "nvd_published_at" : "2025-08-09T03:15:47Z"
  }
}