CVE-2026-6636
Received Received - Intake
Path Traversal in p2r3 API's Bun.serve Enables Remote Exploit

Publication date: 2026-04-20

Last updated on: 2026-04-29

Assigner: VulDB

Description
A vulnerability was detected in p2r3 convert up to 6998584ace3e11db66dff0b423612a5cf91de75b. Affected is the function Bun.serve of the file buildCache.js of the component API. Performing a manipulation of the argument pathname results in path traversal. It is possible to initiate the attack remotely. The exploit is now public and may be used. This product is using a rolling release to provide continious delivery. Therefore, no version details for affected nor updated releases are available. The vendor was contacted early about this disclosure but did not respond in any way.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-20
Last Modified
2026-04-29
Generated
2026-06-16
AI Q&A
2026-04-20
EPSS Evaluated
2026-06-15
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product 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 product 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.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability is a path traversal issue in the p2r3 convert project's buildCache.js file, specifically in the Bun.serve function. It occurs because the server takes a pathname from a request URL, removes a prefix, and then directly uses this path to access files without properly validating or normalizing it.

An attacker can exploit this by injecting directory traversal sequences (like ../) into the pathname, allowing them to access files outside the intended directory (dist). This means unauthorized files such as configuration files, source code, or other sensitive system files could be accessed remotely.

The vulnerability arises from improper sanitization of user-supplied path parameters and lack of path normalization or boundary checks in the server code.

Impact Analysis

This vulnerability can lead to unauthorized disclosure of sensitive files on the server. Attackers can remotely access files outside the intended directory, such as configuration files (package.json, tsconfig.json, .env), source code, or other sensitive system files depending on server permissions.

Such unauthorized access can expose sensitive information that may be used for further attacks, compromise system integrity, or leak confidential data.

Detection Guidance

This vulnerability can be detected by sending crafted HTTP requests that attempt path traversal sequences to the vulnerable server endpoint and observing if files outside the intended directory are returned.

A suggested command to test for this vulnerability is using curl with the --path-as-is flag to prevent client-side normalization and attempt to access sensitive files outside the intended directory.

  • curl --path-as-is http://localhost:8080/convert/../../package.json

If the server responds with the contents of files like package.json, tsconfig.json, or .env located outside the /dist directory, it confirms the presence of the path traversal vulnerability.

Mitigation Strategies

Immediate mitigation involves implementing path normalization and validation to ensure that requested paths do not escape the intended directory.

Specifically, use Node.js path utilities such as join, resolve, and normalize to resolve absolute paths and verify that the resolved path starts with the root directory path.

If a path traversal attempt is detected (i.e., the resolved path does not start with the root directory), the server should respond with a 403 Forbidden status.

Example code fix to mitigate the vulnerability:

  • import { join, resolve, normalize } from "path";
  • const requestedPath = new URL(req.url).pathname.replace("/convert/", "") || "index.html";
  • const rootDir = resolve(__dirname, "dist");
  • const targetPath = resolve(rootDir, normalize(requestedPath));
  • if (!targetPath.startsWith(rootDir)) { return new Response("Forbidden", { status: 403 }); }
  • const file = Bun.file(targetPath);
Compliance Impact

This vulnerability allows unauthorized disclosure of sensitive files through path traversal, potentially exposing configuration files, source code, and other sensitive system files.

Such unauthorized data exposure can lead to non-compliance with common standards and regulations like GDPR and HIPAA, which require protection of sensitive and personal data from unauthorized access.

If sensitive personal or health-related information is stored or accessible via the affected system, this vulnerability could result in data breaches that violate these regulations.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-6636. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart