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-4092

CVE-2026-4092: Arbitrary File Write via Path Traversal in Google Clasp

Alon Barad
Alon Barad
Software Engineer

Mar 13, 2026·6 min read·27 visits

Executive Summary (TL;DR)

A path traversal vulnerability in Google Clasp allows remote attackers to write arbitrary files to a user's system via crafted filenames in Google Apps Script projects, potentially leading to remote code execution.

Google Clasp versions prior to 3.2.0 are vulnerable to a path traversal flaw during the synchronization of remote Google Apps Script projects. This vulnerability allows an attacker to write arbitrary files to the victim's filesystem when cloning or pulling a malicious project, potentially leading to remote code execution.

Vulnerability Overview

Google Clasp (@google/clasp) is the official command-line utility used by developers to manage Google Apps Script projects locally. The tool handles the synchronization of script files between the local filesystem and the remote Google Apps Script infrastructure. It relies on the Google Apps Script API to fetch project metadata and file contents during cloning or pulling operations.

CVE-2026-4092 identifies a critical path traversal vulnerability within the file synchronization mechanism of Clasp versions prior to 3.2.0. The vulnerability stems from the improper sanitization of remote filenames retrieved via the API. When a developer synchronizes a remote project, the tool fails to validate whether the remote filenames contain directory traversal sequences.

This improper input validation exposes developers to arbitrary file write attacks. An attacker can craft a malicious Google Apps Script project containing files named with traversal characters. When a victim clones or pulls this project, the malicious files are written to arbitrary locations on the victim's local filesystem, potentially resulting in remote code execution.

Root Cause Analysis

The root cause of CVE-2026-4092 lies in the fetchRemote function located within src/core/files.ts. This function maps the logical file structure returned by the Google Apps Script API to the physical local filesystem. The core logic retrieves the file name property directly from the remote API response and uses it to construct the local file path.

The Node.js path.resolve() function is utilized to compute the final absolute path by joining the intended project content directory with the remote filename. Because path.resolve() actively interprets traversal sequences such as ../ and absolute paths, any untrusted input passed into this function can alter the base directory resolution. The vulnerable implementation performs this operation without any prior sanitization of the remote filename.

Consequently, the application assumes that the remote API will only return safe, properly scoped filenames. This trust assumption is flawed, as the Google Apps Script platform allows users to define custom filenames within their projects. By manipulating these filenames, an attacker dictates the exact file path where Clasp will write the downloaded file content on the target system.

Code Analysis

The vulnerable implementation of the path resolution logic directly concatenated the content directory with the unsanitized filename. The resulting path was then processed by path.relative to compute the destination for the file write operation.

// Vulnerable implementation snippet
const ext = getFileExtension(f.type, fileExtensionMap);
const localPath = path.relative(process.cwd(), path.resolve(contentDir, `${f.name}${ext}`));

The patch introduced in PR #1109 addresses this flaw by implementing a strict boundary check. A new helper function named isInside was added to verify that the final resolved path strictly resides within the intended project directory. This function evaluates the relative path between the parent directory and the requested child path.

// Patched implementation snippet
function isInside(parentPath: string, childPath: string): boolean {
  const relative = path.relative(parentPath, childPath);
  return (
    relative !== '' &&
    !relative.startsWith('..') &&
    !path.isAbsolute(relative)
  );
}

The fetchRemote function now applies this validation before writing any data. If the isInside check fails, the application aborts the operation and throws a security error. This ensures that even if path.resolve() computes a path outside the working directory, the file system operation is blocked.

Exploitation Methodology

Exploitation of CVE-2026-4092 requires user interaction, specifically the execution of clasp clone or clasp pull commands. The attacker must first construct a malicious Google Apps Script project. Within this project, the attacker renames one or more files to include directory traversal sequences, targeting specific sensitive files on standard operating systems.

For example, an attacker might name a file ../../../../.ssh/authorized_keys and populate its contents with their own public SSH key. The attacker then shares this project publicly or targets specific developers through social engineering, encouraging them to clone the repository for collaboration or review.

When the victim executes clasp clone <scriptId>, the tool queries the Google Apps Script API and retrieves the malicious file metadata. The vulnerable fetchRemote function processes the traversal sequence, escapes the project directory boundary, and overwrites the specified system file with the attacker's payload.

Impact Assessment

The primary impact of this path traversal vulnerability is arbitrary file write in the context of the user running the Clasp utility. Because developers frequently run Clasp under their primary user account, the tool typically possesses read and write access to the user's home directory. This allows an attacker to overwrite critical configuration files, user profiles, or credentials.

Arbitrary file write frequently leads to remote code execution (RCE) on developer workstations. An attacker can achieve RCE by overwriting shell configuration files such as .bashrc or .zshrc, adding SSH keys to authorized_keys, or modifying execution paths. When the user subsequently opens a terminal or logs into their machine, the malicious payload executes.

The CVSS v4.0 score of 8.7 reflects the high severity of the confidentiality, integrity, and availability impacts. While the attack vector requires user interaction, the exploitation complexity is extremely low. Attackers do not need to bypass memory mitigations or craft complex network payloads; they only require the victim to synchronize a specifically structured project.

Remediation and Mitigation

To mitigate CVE-2026-4092, organizations and individual developers must update their @google/clasp installations to version 3.2.0 or higher. The update can be applied globally using the Node Package Manager via the command npm install -g @google/clasp@latest. This version includes the strict boundary validation required to prevent traversal attacks.

In environments where immediate patching is not feasible, developers must exercise strict operational hygiene. Users should only clone or pull Google Apps Script projects from fully trusted sources. Auditing the contents of a project via the Google Apps Script web interface prior to synchronizing it locally can help identify malicious filenames.

Running development tools with the principle of least privilege provides an additional layer of defense. Executing Clasp within an isolated container or a dedicated development user account restricts the impact of an arbitrary file write. If a traversal occurs within an isolated environment, the attacker is prevented from modifying the host system's primary user configuration files.

Official Patches

GoogleOfficial Pull Request containing the fix
GoogleRelease notes for version 3.2.0

Fix Analysis (1)

Technical Appendix

CVSS Score
8.7/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected Systems

Google Clasp (@google/clasp)

Affected Versions Detail

Product
Affected Versions
Fixed Version
@google/clasp
Google
< 3.2.03.2.0
AttributeDetail
CWE IDCWE-22
CVSS v4.08.7 (High)
Attack VectorNetwork / Requires User Interaction
ImpactArbitrary File Write / RCE
Exploit StatusProof of Concept (PoC) Available
KEV ListedNo

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
T1554Compromise Client Software Binary
Persistence
T1059Command and Scripting Interpreter
Execution
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Known Exploits & Detection

GitHubProof of concept details included in the original fix Pull Request

Vulnerability Timeline

Fix commit ba6bd66 submitted via Pull Request #1109
2026-01-31
Version 3.2.0 officially released with mitigation
2026-02-01
CVE-2026-4092 officially published and assigned by Google
2026-03-13

References & Sources

  • [1]Official CVE Record: CVE-2026-4092
  • [2]NVD Entry for CVE-2026-4092

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

•44 minutes ago•CVE-2026-11645
8.8

CVE-2026-11645: Out-of-Bounds Memory Access in Google Chrome V8 Engine

A high-severity memory corruption vulnerability exists in the V8 JavaScript engine of Google Chrome before versions 149.0.7827.102/103. The flaw arises from an incorrect bounds-check elimination during JIT compilation by the TurboFan optimizer, allowing remote attackers to achieve out-of-bounds read and write access inside the sandboxed renderer process.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 9 hours ago•CVE-2026-50751
9.3

CVE-2026-50751: Authentication Bypass in Check Point Security Gateway IKEv1 Legacy Validation

An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.

Alon Barad
Alon Barad
53 views•6 min read
•about 23 hours ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•1 day ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
12 views•7 min read
•3 days ago•GHSA-G72G-R7M4-9X4G
6.3

GHSA-G72G-R7M4-9X4G: Insufficient Session Expiration of OAuth Tokens in NocoDB

NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.

Amit Schendel
Amit Schendel
12 views•6 min read
•3 days ago•GHSA-FGMC-2HQJ-86V4
6.9

GHSA-FGMC-2HQJ-86V4: Default Administrative Credentials in vantage6-server

A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.

Amit Schendel
Amit Schendel
8 views•5 min read