PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2025-55013: 
Python vulnerability analysis and mitigation

Overview

CVE-2025-55013 is a relative path traversal vulnerability (CWE-23) in the Assemblyline 4 Service Client (assemblyline-service-client) that allows a malicious or compromised server — or a man-in-the-middle attacker — to write arbitrary files to unintended locations on the client's filesystem. The vulnerability affects all releases of assemblyline-service-client below version 4.6.1.dev138 and 4.6.0.stable11. It was published on August 9, 2025, with the fix committed on July 25, 2025. The NVD-assigned CVSS v3.1 base score is 4.2 (Medium), reflecting an adjacent-network attack vector with high complexity (GitHub Advisory, Red Hat CVE).

Technical details

The root cause is in assemblyline_service_client/task_handler.py, specifically in the download_file() function, where the line file_path = os.path.join(self.tasking_dir, sha256) constructs a file path using a SHA-256 value taken directly from the service-server JSON response without any validation or sanitization (CWE-23). An attacker controlling or impersonating the service server can return a path-traversal payload (e.g., ../../../etc/cron.d/evil) in place of a legitimate SHA-256 hash, causing the client to write attacker-controlled bytes to an arbitrary location on disk. The fix, introduced in commit 351414e, adds a regex validation check (SHA256_REGEX.match(sha256)) before the file path is constructed, rejecting any value that does not conform to a valid 64-character hexadecimal SHA-256 string (GitHub Advisory, Fix Commit).

Impact

Successful exploitation allows an attacker to write arbitrary content to any file location writable by the service process UID, which may run as root in some deployments. This can result in integrity compromise (overwriting critical system files), availability impact (corrupting files or exhausting disk space), and potential code execution by dropping malicious cron jobs, systemd units, or overwriting executables. Confidentiality is not directly impacted, but code execution achieved through file writes could enable further lateral movement or privilege escalation (GitHub Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time. The attack requires an adjacent network position and high complexity — specifically, the ability to act as or compromise the Assemblyline service server, or perform a man-in-the-middle attack on the client-server communication. The EPSS score is approximately 0.044%, indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory, Red Hat CVE).

Exploitation steps

  1. Reconnaissance: Identify a deployment of assemblyline-service-client below version 4.6.1.dev138 or 4.6.0.stable11 that is not running within a properly secured containerized environment (e.g., misconfigured Docker/Kubernetes network policies).
  2. Gain server control or MITM position: Compromise the Assemblyline service server, or position yourself as a man-in-the-middle on the network path between the service client and server (e.g., via ARP spoofing or DNS poisoning on an adjacent network).
  3. Craft malicious response: When the client sends a GET /api/v1/file/<sha256> request to fetch a task file, intercept or replace the server response with a JSON payload containing a path-traversal string in the SHA-256 field, such as ../../../etc/cron.d/evil.
  4. Trigger arbitrary file write: The vulnerable download_file() function in task_handler.py constructs the path os.path.join(self.tasking_dir, '../../../etc/cron.d/evil') and writes the attacker-supplied response body to /etc/cron.d/evil.
  5. Achieve persistence or code execution: The written file (e.g., a cron job or systemd unit) is executed by the operating system, granting the attacker persistent access or arbitrary command execution on the host (GitHub Advisory).

Indicators of compromise

  • File System: Unexpected files in sensitive directories such as /etc/cron.d/, /etc/cron.hourly/, /etc/systemd/system/, or other system directories, with creation timestamps correlating to Assemblyline service client activity; modified or newly created binaries in system paths writable by the service UID.
  • Logs: Assemblyline service client logs (task_handler.py) showing unusual SHA-256 values containing path separators (../, /) or non-hexadecimal characters; error log entries referencing Invalid SHA256 provided (post-patch, indicating attempted exploitation).
  • Network: Unexpected or anomalous HTTP responses from the service server containing non-standard SHA-256 field values; unusual outbound connections from the service host following file write events.
  • Process: Unexpected cron job executions or new systemd service activations originating from files written to system directories around the time of Assemblyline service client task processing (GitHub Advisory).

Mitigation and workarounds

Upgrade assemblyline-service-client to version 4.6.1.dev138 or 4.6.0.stable11 (also released as 4.6.0.11), which adds SHA-256 regex validation before file path construction. As a workaround, ensure the service client runs within a properly containerized environment (Docker or Kubernetes) with strict filesystem-level permissions limiting what the service UID can write, and enforce network policies to prevent unauthorized parties from communicating with the client. Additionally, restrict network access to the service and monitor for unexpected file creation in sensitive system directories (GitHub Advisory, Fix Commit).

Community reactions

The vulnerability was reported by researcher serexp and disclosed via GitHub Security Advisories by the CybercentreCanada team on July 25, 2025. The advisory notes that in standard production deployments using containerized environments (Docker/Kubernetes), the practical exploitability is significantly reduced due to filesystem permission controls and network isolation. Red Hat also tracked the vulnerability, and CISA included it in its weekly vulnerability bulletin for the week of August 4, 2025 (GitHub Advisory, CISA Bulletin).

Additional resources


Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-cwm5-jh59-mwxrHIGH7.5
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-53xc-49m8-p798HIGH7.5
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-q7qq-6mhp-9rc4MEDIUM5.4
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-2qrf-pqgx-qh9vMEDIUM4.9
  • Python logoPython
  • twisted
NoYesOct 22, 2026
GHSA-3476-c5c2-fr73LOWN/A
  • Python logoPython
  • twisted
NoYesOct 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management