/

CVE-2026-58257

Severity:

HIGH RISK

(7.2)

Path Traversal (CWE-22) in GRR Database Restore Feature

CVE-2026-58257

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Sensitive File Disclosure and Denial of Service

Severity:

HIGH RISK

(7.2)

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

GRR's database restoration feature does not adequately validate or constrain file paths supplied during restoration. An authenticated administrator may exploit this weakness to read sensitive files or delete arbitrary files, potentially causing denial of service, especially when the server has elevated operating-system privileges.

GRR's database restoration feature does not adequately validate or constrain file paths supplied during restoration. An authenticated administrator may exploit this weakness to read sensitive files or delete arbitrary files, potentially causing denial of service, especially when the server has elevated operating-system privileges.

Affected context

The issue occurs in GRR deployments that expose the database restoration feature and rely on user-supplied file paths without enforcing an approved directory or validating path semantics. Exploitation generally requires administrator-level access to the application, and the consequences depend on the permissions of the GRR server process.

The issue occurs in GRR deployments that expose the database restoration feature and rely on user-supplied file paths without enforcing an approved directory or validating path semantics. Exploitation generally requires administrator-level access to the application, and the consequences depend on the permissions of the GRR server process.

Exploit preconditions

  • Attack surface: Database restoration functionality
  • Required access: Authenticated GRR administrator privileges
  • Trigger point: Processing a manipulated file path during a restore operation
  • Why exploitation is possible: The feature does not sufficiently validate or constrain paths before performing file operations
  • Impact amplifier: The server process may access more files or perform more destructive operations when running with elevated privileges
  • Attack surface: Database restoration functionality
  • Required access: Authenticated GRR administrator privileges
  • Trigger point: Processing a manipulated file path during a restore operation
  • Why exploitation is possible: The feature does not sufficiently validate or constrain paths before performing file operations
  • Impact amplifier: The server process may access more files or perform more destructive operations when running with elevated privileges

Why this happens

The underlying bug is insufficient path validation in a file-handling workflow. When application-controlled file operations accept attacker-influenced paths without canonicalization, allowlisting, or confinement to an intended directory, traversal sequences or other path manipulation can redirect access outside the permitted location. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

The underlying bug is insufficient path validation in a file-handling workflow. When application-controlled file operations accept attacker-influenced paths without canonicalization, allowlisting, or confinement to an intended directory, traversal sequences or other path manipulation can redirect access outside the permitted location. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Sensitive files may be disclosed to an authorized but malicious administrator
  • Arbitrary files may be deleted, causing service disruption or denial of service
  • Application data, configuration, or credentials may be exposed
  • Host or server compromise could become more likely if sensitive files are accessible
  • The blast radius may increase when the service runs with elevated privileges
  • Sensitive files may be disclosed to an authorized but malicious administrator
  • Arbitrary files may be deleted, causing service disruption or denial of service
  • Application data, configuration, or credentials may be exposed
  • Host or server compromise could become more likely if sensitive files are accessible
  • The blast radius may increase when the service runs with elevated privileges

General mitigation guidance

Mitigation centers on treating restoration paths as untrusted input and enforcing a narrow, explicit file-access boundary.

Common defensive patterns include:

  • Resolve and canonicalize paths before use, then verify they remain within an approved restoration directory
  • Prefer server-selected file identifiers or predefined storage locations over raw client-supplied paths
  • Apply strict allowlists for permitted files and operations
  • Separate read and delete capabilities, requiring additional authorization for destructive actions
  • Run the application with the least privileges needed and isolate restoration storage from sensitive host paths
  • Use controlled, auditable temporary directories and apply filesystem permissions that limit disclosure and deletion
  • Add safeguards such as confirmation, logging, and recovery controls for destructive file operations

Mitigation centers on treating restoration paths as untrusted input and enforcing a narrow, explicit file-access boundary.

Common defensive patterns include:

  • Resolve and canonicalize paths before use, then verify they remain within an approved restoration directory
  • Prefer server-selected file identifiers or predefined storage locations over raw client-supplied paths
  • Apply strict allowlists for permitted files and operations
  • Separate read and delete capabilities, requiring additional authorization for destructive actions
  • Run the application with the least privileges needed and isolate restoration storage from sensitive host paths
  • Use controlled, auditable temporary directories and apply filesystem permissions that limit disclosure and deletion
  • Add safeguards such as confirmation, logging, and recovery controls for destructive file operations

How teams detect issues like this

Detection can combine code analysis, runtime monitoring, and authorization review.

Useful approaches include:

  • Static analysis for filesystem APIs that receive request parameters or form fields directly
  • Code review checks for missing canonicalization, prefix-boundary validation, and directory confinement
  • Testing with traversal variants, absolute paths, symbolic links, and platform-specific path syntax in isolated environments
  • Monitoring restoration activity for access outside approved storage locations or unusual file deletions
  • Policy enforcement requiring security review for administrative features that read or delete server-side files
  • Automated review tools that flag untrusted input reaching file-operation APIs

Detection can combine code analysis, runtime monitoring, and authorization review.

Useful approaches include:

  • Static analysis for filesystem APIs that receive request parameters or form fields directly
  • Code review checks for missing canonicalization, prefix-boundary validation, and directory confinement
  • Testing with traversal variants, absolute paths, symbolic links, and platform-specific path syntax in isolated environments
  • Monitoring restoration activity for access outside approved storage locations or unusual file deletions
  • Policy enforcement requiring security review for administrative features that read or delete server-side files
  • Automated review tools that flag untrusted input reaching file-operation APIs

Sources

SourceLink
github.comgithub.com/JeromeDevome/GRR/commit/e1f93b08ae6ebbab3ddbcd6b900800c39fb048de
github.comgithub.com/JeromeDevome/GRR/security/advisories/GHSA-p8vm-f8mr-q7w7
github.comgithub.com/JeromeDevome/GRR/tree/v4.5.0

Frequently asked

questions

It may be exploitable through the GRR application interface when that interface is reachable and the attacker has the required administrator privileges. It is not generally an unauthenticated issue based on the reported conditions.

The reported exploitation scope requires an authenticated user with administrator-level access to the database restoration feature. The server process's filesystem permissions determine which files can be read or deleted.

Constrain all restoration paths to a dedicated, approved directory after canonicalization and validation. Avoid accepting unrestricted raw filesystem paths from users, and separate or tightly authorize destructive operations.

Use least-privilege service accounts, enforce path-confinement checks, test filesystem boundaries during security reviews, and monitor administrative file operations for anomalous access.

It may be exploitable through the GRR application interface when that interface is reachable and the attacker has the required administrator privileges. It is not generally an unauthenticated issue based on the reported conditions.

The reported exploitation scope requires an authenticated user with administrator-level access to the database restoration feature. The server process's filesystem permissions determine which files can be read or deleted.

Constrain all restoration paths to a dedicated, approved directory after canonicalization and validation. Avoid accepting unrestricted raw filesystem paths from users, and separate or tightly authorize destructive operations.

Use least-privilege service accounts, enforce path-confinement checks, test filesystem boundaries during security reviews, and monitor administrative file operations for anomalous access.

Find out what's already
exploitable in your codebase.