/

CVE-2026-85736

Severity:

HIGH RISK

(8.1)

Arbitrary File Deletion (CWE-73) in Chartbrew Web App

CVE-2026-85736

Deferred

Vulnerability type

Category:

Unrestricted File Path Control

CWE:

CWE-73

Impact:

Arbitrary File Deletion, Integrity Loss, and Service Disruption

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Chartbrew connection settings can store attacker-chosen SSL certificate or SSH key paths, which may later be passed to file deletion without restricting them to managed certificate files. A user who can create or update and then delete a connection on their own team may cause files accessible to the Chartbrew process to be removed.

Affected context

The issue is in data-connection certificate and SSH-key cleanup. It can occur when connection creation or update accepts absolute file paths and cleanup later treats those stored values as managed files without verifying that they remain within an approved directory. The extent of possible deletion depends on the permissions of the Chartbrew process; the default container runs as uid 0.

Exploit preconditions

  • Attack surface: Data-connection creation, update, and cleanup in Chartbrew
  • Required access: Permission to create or update and delete connections on the user's own team; default self-signup grants a teamOwner these permissions
  • Trigger point: Deleting a connection can invoke cleanup of its stored SSL or SSH path; duplicateConnection is also identified as a cleanup trigger
  • Why exploitation is possible: Cleanup passes the stored path to fs.unlink without restricting it to an approved certificate directory
  • Permission boundary: Deletion is limited by the filesystem permissions of the Chartbrew process

Why this happens

Connection data includes file paths that can be selected by the user, but cleanup uses those values as filesystem deletion targets without enforcing a trusted directory boundary. This is an instance of CWE-73: External Control of File Name or Path: externally controlled path data influences a sensitive filesystem operation.

Potential impact

  • An attacker may delete files that the Chartbrew process can access, such as /code/.env or application source files
  • Deletion of configuration or application files could cause integrity loss or service disruption
  • A process running with elevated filesystem permissions could expose a broader set of files to deletion

General mitigation guidance

Common defensive patterns include:

  • Avoid using user-supplied paths directly in file deletion operations
  • Store managed files under an application-controlled directory and derive deletion targets from trusted identifiers
  • Canonicalize and validate paths against an explicit allowed directory before filesystem operations
  • Apply least-privilege permissions to the application process and container
  • Treat connection settings as untrusted input, even when submitted by authenticated team members

How teams detect issues like this

  • Use static analysis to find file deletion calls that receive paths from request data, persisted connection fields, or other externally influenced sources
  • Review connection creation, update, duplication, and cleanup flows for path validation and directory-boundary enforcement
  • Monitor application and container filesystem activity for deletion attempts outside designated managed-file directories
  • Apply code-review and policy checks that require trusted path construction for destructive filesystem operations

Sources

SourceLink
github.comgithub.com/chartbrew/chartbrew/commit/aa931cc868eff8c4343ae2263539fa2d0d4a0943
github.comgithub.com/chartbrew/chartbrew/releases/tag/v5.2.3
github.comgithub.com/chartbrew/chartbrew/security/advisories/GHSA-p5h6-f969-jpfv

Frequently asked

questions

A user who can create or update and then delete a connection on their own team may trigger the vulnerable cleanup behavior. Default self-signup grants teamOwner permissions that include these actions.

The described attack uses Chartbrew's connection-management interface; it does not require direct filesystem access. The files that can be deleted are limited by the permissions of the Chartbrew process.

Do not pass user-controlled paths directly to deletion operations. Keep managed files in an application-controlled directory and derive validated deletion targets from trusted identifiers.

Treat persisted paths as untrusted, enforce directory-boundary checks for filesystem operations, and run the application with only the filesystem permissions it needs.

Find out what's already
exploitable in your codebase.