/

CVE-2026-82286

Severity:

HIGH RISK

(8.6)

Path Traversal (CWE-22) in gpt-crawler POST Endpoint

CVE-2026-82286

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Overwrite

Severity:

HIGH RISK

(8.6)

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

A path traversal vulnerability in gpt-crawler allows unauthenticated attackers to control the destination used for crawl output files. By supplying an absolute path or parent-directory segments, an attacker may overwrite files with content retrieved from attacker-controlled URLs.

Affected context

The vulnerability occurs in gpt-crawler deployments using the POST /crawl endpoint through version 1.5.1. It becomes risky when the endpoint accepts the outputFileName parameter without constraining it to an intended output directory, resolving canonical paths, or enforcing an allowlisted filename policy.

Exploit preconditions

  • Attack surface: The POST /crawl HTTP endpoint
  • Required access: No authentication is required when the endpoint is reachable
  • Trigger point: Processing the attacker-controlled outputFileName parameter during a crawl request
  • Why exploitation is possible: The application does not adequately distinguish safe relative output names from absolute paths or parent-directory traversal references, allowing writes outside the intended directory

Why this happens

The underlying bug is improper limitation of a user-controlled filesystem path, mapping to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The application uses outputFileName as a destination without consistently enforcing directory boundaries and safe path semantics. When path input is trusted before canonicalization and policy validation, filesystem operations may target locations outside the intended output area.

Potential impact

  • An attacker may overwrite existing application or configuration files
  • The service may experience denial of service or corrupted runtime state
  • Sensitive files could be damaged, depending on process permissions
  • Overwritten files could influence application behavior or downstream jobs
  • The vulnerability could contribute to code execution if a writable file is later interpreted as executable configuration or code

General mitigation guidance

Mitigation generally focuses on treating outputFileName as an untrusted identifier rather than a filesystem path.

Common defensive patterns include:

  • Restricting writes to a dedicated, non-sensitive output directory
  • Rejecting absolute paths, parent-directory traversal, separators, and platform-specific path forms where they are not required
  • Canonicalizing paths before authorization and verifying that the resolved destination remains within the permitted directory
  • Prefering server-generated filenames or opaque object identifiers over client-selected paths
  • Enforcing strict input schemas and allowlists for permitted filename characters
  • Running the service with the minimum filesystem permissions needed for crawling
  • Separating downloaded content from executable, configuration, and application directories
  • Applying storage isolation and monitoring write operations involving sensitive locations

How teams detect issues like this

Organizations can detect this vulnerability class through:

  • Static analysis rules for filesystem writes that use request parameters or other untrusted input
  • Code review checks for missing canonicalization, directory-boundary validation, and filename allowlists
  • API tests covering absolute paths, parent-directory references, encoded separators, and platform-specific path syntax
  • Runtime monitoring for unexpected writes outside designated storage directories
  • Policy enforcement requiring service accounts and containers to use restricted, non-sensitive filesystems
  • Automated security review tools that identify path construction from HTTP request data

Sources

SourceLink
github.comgithub.com/BuilderIO/gpt-crawler
github.comgithub.com/BuilderIO/gpt-crawler/blob/d2245d66a5ad60bf227a55c849135394cbecc9b5/src/config.ts
github.comgithub.com/BuilderIO/gpt-crawler/blob/d2245d66a5ad60bf227a55c849135394cbecc9b5/src/core.ts
github.comgithub.com/BuilderIO/gpt-crawler/issues/418
vulncheck.comvulncheck.com/advisories/gpt-crawler-arbitrary-file-write-via-outputfilename-parameter

Frequently asked

questions

Yes. A reachable POST /crawl endpoint may be sufficient because the vulnerable parameter is accepted without authentication.

The attacker generally needs network access to the endpoint but does not need an authenticated account. The resulting impact depends on the permissions of the gpt-crawler process.

Treat the parameter as a logical filename, not a path. Use server-controlled storage locations, canonicalize before authorization, and verify that every resolved destination remains within an isolated output directory.

Apply strict path validation, minimize filesystem privileges, isolate downloaded content from sensitive directories, and include traversal-focused cases in API testing and code review.

Find out what's already
exploitable in your codebase.