Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-58355

CVE-2025-58355: Soft Serve Path Traversal Vulnerability

CVE-2025-58355 is a path traversal flaw in Soft Serve Git server that allows attackers to create or override arbitrary files via SSH API. This article covers the technical details, affected versions, impact, and mitigation.

Published:

CVE-2025-58355 Overview

CVE-2025-58355 is a path traversal vulnerability [CWE-22] affecting Soft Serve, a self-hostable Git server for the command line developed by Charmbracelet. Authenticated attackers can create or overwrite arbitrary files with uncontrolled data through the SSH Application Programming Interface (API). The flaw exists in versions 0.9.1 and below, and is fixed in version 0.10.0.

Critical Impact

Attackers with low-privilege SSH access can write to arbitrary file paths on the host, leading to integrity compromise of the Git server and potential lateral impact on adjacent components.

Affected Products

  • Charmbracelet Soft Serve versions 0.9.1 and below
  • Self-hosted Soft Serve Git server deployments exposing the SSH API
  • Any service co-located with Soft Serve that relies on writable filesystem paths

Discovery Timeline

  • 2025-09-04 - CVE-2025-58355 published to the National Vulnerability Database (NVD)
  • 2026-04-15 - Last updated in NVD database

Technical Details for CVE-2025-58355

Vulnerability Analysis

Soft Serve exposes a Secure Shell (SSH) API that handles repository and configuration operations. In versions at or below 0.9.1, request handlers accept file path parameters without sufficient normalization or containment. An authenticated client can supply traversal sequences or absolute paths that escape the intended repository directory.

The result is arbitrary file creation or overwrite on the host filesystem, with content controlled by the attacker. The vulnerability scope changes during exploitation, meaning the impact can extend beyond the Soft Serve process boundary to other resources the user account can reach. Confidentiality is not directly affected, but integrity impact is high because attackers can overwrite configuration files, scripts, or authorized keys.

Root Cause

The root cause is improper limitation of a pathname to a restricted directory [CWE-22]. Soft Serve's SSH API handlers concatenate or resolve user-supplied paths without rejecting .. segments or absolute paths. File write primitives execute with the privileges of the Soft Serve service account.

Attack Vector

Exploitation requires network reachability to the Soft Serve SSH endpoint and valid low-privilege credentials. The attacker authenticates over SSH, then issues API operations referencing paths outside the intended repository scope. No user interaction is required, and attack complexity is low.

The vulnerability is described in the GitHub Security Advisory GHSA-33pr-m977-5w97. No public proof-of-concept exploit is currently listed in NVD references.

Detection Methods for CVE-2025-58355

Indicators of Compromise

  • Unexpected files appearing outside the configured Soft Serve data directory, particularly in system paths such as /etc/, /root/, or user home directories
  • Modifications to authorized_keys, shell startup files, or systemd unit files on the Soft Serve host
  • SSH session logs showing API operations with payloads containing .. traversal sequences or absolute path references
  • New or altered files owned by the Soft Serve service user outside repository directories

Detection Strategies

  • Audit Soft Serve SSH access logs for API calls that reference paths containing .., leading slashes, or null bytes
  • Deploy file integrity monitoring (FIM) on the Soft Serve host, focusing on directories outside the repository root
  • Correlate authentication events on the SSH API with filesystem write events using endpoint telemetry
  • Compare running Soft Serve binary version against 0.10.0 to identify vulnerable instances

Monitoring Recommendations

  • Enable verbose Soft Serve logging and forward to a centralized log platform for retention and search
  • Alert on writes by the Soft Serve service account to sensitive paths such as /etc/ssh/, /etc/cron.d/, and user .ssh/ directories
  • Track creation of executable files under directories that should contain only Git data

How to Mitigate CVE-2025-58355

Immediate Actions Required

  • Upgrade Soft Serve to version 0.10.0 or later on all hosts
  • Inventory all Soft Serve deployments and confirm the version reported by soft serve --version
  • Rotate SSH credentials and tokens used to authenticate to Soft Serve after upgrading
  • Review the filesystem of any Soft Serve host that ran a vulnerable version for unauthorized file modifications

Patch Information

The maintainers fixed the vulnerability in Soft Serve version 0.10.0. Refer to the GitHub Security Advisory GHSA-33pr-m977-5w97 for the upstream remediation details and release notes.

Workarounds

  • Restrict network exposure of the Soft Serve SSH port to trusted source addresses using firewall rules
  • Disable or revoke API access for untrusted accounts until the upgrade to 0.10.0 is complete
  • Run Soft Serve as a dedicated unprivileged user inside a container or chroot to limit the filesystem reachable by the process
  • Monitor for unauthorized writes outside the Soft Serve data directory while upgrades are scheduled
bash
# Verify installed Soft Serve version and upgrade
soft serve --version

# Example container upgrade pattern
docker pull charmcli/soft-serve:v0.10.0
docker stop soft-serve && docker rm soft-serve
docker run -d --name soft-serve \
  -p 23231:23231 \
  -v /var/lib/soft-serve:/soft-serve \
  charmcli/soft-serve:v0.10.0

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.