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

•about 1 hour ago•CVE-2026-116580
7.3

CVE-2026-116580: Unvalidated Method Invocation via Identifier Reuse in Seroval Deserializer

Seroval versions prior to 1.6.8 contain an insecure deserialization vulnerability (CWE-502) in the `fromJSON` parser. When reconstructing `AsyncIteratorFactoryInstance` or `IteratorFactoryInstance` nodes, the deserializer verifies the source node type using its identifier in the AST lookup table rather than verifying the runtime identity of the deserialized object. Because unmarked node identifiers omitted from the `m` reference array can be reused in vanilla deserialization mode, an attacker can substitute an arbitrary plain object or plugin-produced value as the stream source. This causes the runtime to invoke `.on(listener)` on an attacker-controlled target.

Amit Schendel
Amit Schendel
1 views•12 min read
•about 2 hours ago•CVE-2026-116584
7.5

CVE-2026-116584: Denial of Service via Unvalidated Node Element Lists in Seroval

A Denial of Service (DoS) vulnerability exists in the Seroval JavaScript serialization library affecting versions 1.4.1 through 1.6.7. The deserialization routines fromJSON and fromCrossJSON fail to verify that node element lists are actual JavaScript Array primitives before reading their length property. An unauthenticated remote attacker can supply a compact, malformed JSON payload containing an array-like object with an arbitrary length value, causing unbounded memory allocation and synchronous loop iterations that block the event loop or crash the process via heap exhaustion.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•CVE-2026-116581
7.5

CVE-2026-116581: Unauthenticated Event-Loop Denial of Service via Unvalidated Sequence Indices in Seroval

Seroval, a JavaScript serialization library used for transferring complex structures across network boundaries, contains an input validation vulnerability in versions prior to 1.6.8. The `fromJSON` and `fromCrossJSON` deserializers fail to validate array element lists and the termination boundaries (`done` and `throw` indices) of sequence nodes. By supplying out-of-bounds indices or forged array-like structures, an unauthenticated remote attacker can construct an iterator with an unreachable exit condition or trigger excessive loop iterations, halting the single-threaded JavaScript event loop and causing a denial of service.

Amit Schendel
Amit Schendel
7 views•10 min read
•about 4 hours ago•CVE-2026-116582
4.7

CVE-2026-116582: Cross-Site Scripting via Unescaped RegExp Serialization in Seroval

CVE-2026-116582 is an improper output escaping vulnerability in the Seroval JavaScript serialization library that leads to cross-site scripting (XSS). When Seroval serializes RegExp objects into executable JavaScript literals for embedding in HTML script elements, it fails to neutralize the less-than character ('<'). If an application constructs a regular expression from untrusted input and embeds the serialized output inside an inline script block during server-side rendering (SSR), an attacker can inject a closing script tag to break out of the JavaScript context and execute arbitrary client-side code.

Amit Schendel
Amit Schendel
4 views•11 min read
•about 5 hours ago•CVE-2026-116583
5.3

CVE-2026-116583: Code Injection via TypedArray Constructor Property Spoofing in Seroval

CVE-2026-116583 (GHSA-f86p-h4j2-7qgj) is a code injection and cross-site scripting (XSS) vulnerability in Seroval, a JavaScript object serialization library. In versions 1.6.0 prior to 1.6.11, Seroval derives the constructor name of a TypedArray directly from the `current.constructor.name` property expression during serialization. If an attacker supplies untrusted properties that are merged onto a TypedArray instance, an own `constructor` property overrides the prototype property and gets emitted unescaped after the `new` keyword in the generated JavaScript output. Evaluating or rendering this output in a browser or JavaScript runtime results in arbitrary code execution.

Alon Barad
Alon Barad
5 views•8 min read
•about 6 hours ago•GHSA-JF75-Q64Q-G65R
6.5

GHSA-jf75-q64q-g65r: NoSQL Query Manipulation and Partial Authentication Bypass in Waline Server

An improper input validation and NoSQL query construction vulnerability exists in the Waline comment system server (@waline/vercel) version 1.40.3 and earlier. When MongoDB is used as the backend storage engine, the POST /api/token authentication endpoint fails to validate that the user-supplied email parameter is a string. Supplying a JSON object or array operator causes the MongoDB storage adapter to omit the email filter or construct an unintended match-all query, returning all user records and allowing unauthenticated attackers to target the site administrator account directly without knowing the administrator's email address.

Alon Barad
Alon Barad
4 views•10 min read