Vulnerabilities in pkg:npm/@logto/tunnel

PACKAGE
Advisory Identifier: GHSA-rxjr-6c9q-h67x
Advisory Summary

CVE-2026-63188 is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @logto/tunnel libraries in the npm ecosystem. The issue involves logto-tunnel serves files outside --experience-path via path traversal. Remediation is available by upgrading affected packages to version 0.3.9.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@logto/tunnel

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@logto/tunnel. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rxjr-6c9q-h67x CVE-2026-63188 HIGH logto-tunnel serves files outside --experience-path via path traversal

CVE-2026-63188 at a Glance

CVE Identifier CVE-2026-63188
GHSA Identifier GHSA-rxjr-6c9q-h67x
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product @logto/tunnel
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-63188

To remediate this vulnerability, upgrade all affected @logto/tunnel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@logto/tunnel fixed: 0.3.9
npm install @logto/tunnel@0.3.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @logto/tunnel

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-63188, inspect your project dependencies using npm:

npm ls @logto/tunnel

Analyze the terminal output to locate any version of @logto/tunnel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.9), your application is affected.

Note: The npm ls @logto/tunnel command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In @logto/tunnel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `@logto/tunnel` serves custom sign-in experience files from the `--experience-path` directory. When the tunnel service is reachable, a requester can use `../` path segments in a static asset request to read files outside that directory that the CLI process can read. ### Details The tunnel command accepts `--experience-path` as the local folder path for custom sign-in experience assets. `packages/tunnel/src/commands/tunnel/index.ts` enables `createStaticFileProxy(path)` when that option is set and sends non-Logto, non-`--experience-uri` requests to that static proxy. The server is started with `server.listen(port)`. `packages/tunnel/src/commands/tunnel/utils.ts` builds the filesystem path as `path.join(staticPath, fallBackToIndex ? index : request.url)`. For file asset paths, `request.url` is used directly. A request URL such as `/../secret.txt` resolves outside `staticPath` and is then opened with `fs.open(requestPath, 'r')`. There is no URL normalization and no containment check that the resolved path remains under the configured static directory before the file is read and returned. The proof boundary is the packaged CLI end-to-end run. The filesystem read primitive was validated with equivalent Node HTTP handling for the affected code path, including that Node preserves `/../secret.txt` in `request.url` and that bare `server.listen(port)` binds to all interfaces on this platform. ### PoC 1. Create a custom UI directory at `/tmp/logto-ui/static` with `/tmp/logto-ui/static/index.html`. 2. Create a sibling file outside the static root, for example `/tmp/logto-ui/secret.txt`. 3. Start the tunnel with `logto-tunnel --endpoint https://<tenant-id>.logto.app --port 9000 --experience-path /tmp/logto-ui/static`. 4. Request `http://<host>:9000/../secret.txt`. 5. The response body contains the contents of `/tmp/logto-ui/secret.txt`. ### Impact The observed result is arbitrary file read outside the configured custom UI static directory. If the tunnel port is reachable from another host, an unauthenticated network peer can read local files readable by the `logto-tunnel` process, including development secrets or credentials stored near the custom UI project.

CVE-2026-63188 Affected @logto/tunnel Versions

1 component(s)
Fixed Versions:
0.3.9
Product / Package Ecosystem Affected Versions Fixed Version
@logto/tunnel
npm
< 0.3.9
0.3.9

References

Frequently Asked Questions

What is CVE-2026-63188?
CVE-2026-63188 is a security vulnerability in @logto/tunnel involving logto-tunnel serves files outside --experience-path via path traversal under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which @logto/tunnel versions are affected?
Affected versions include releases prior to 0.3.9 across affected packages: @logto/tunnel.
What version fixes CVE-2026-63188?
Upgrading to 0.3.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @logto/tunnel affected?
Yes, @logto/tunnel is affected in releases prior to 0.3.9. Upgrade your dependency to 0.3.9 or later.
What CWE is associated with CVE-2026-63188?
CVE-2026-63188 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check npm dependencies for CVE-2026-63188?
Run the dependency tree command: 'npm ls @logto/tunnel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rxjr-6c9q-h67x",
  "modified" : "2026-08-19T20:24:06Z",
  "published" : "2026-08-19T20:24:06Z",
  "aliases" : [ "CVE-2026-63188" ],
  "summary" : "logto-tunnel serves files outside --experience-path via path traversal",
  "details" : "### Summary\n\n`@logto/tunnel` serves custom sign-in experience files from the `--experience-path` directory. When the tunnel service is reachable, a requester can use `../` path segments in a static asset request to read files outside that directory that the CLI process can read.\n\n### Details\n\nThe tunnel command accepts `--experience-path` as the local folder path for custom sign-in experience assets. `packages/tunnel/src/commands/tunnel/index.ts` enables `createStaticFileProxy(path)` when that option is set and sends non-Logto, non-`--experience-uri` requests to that static proxy. The server is started with `server.listen(port)`.\n\n`packages/tunnel/src/commands/tunnel/utils.ts` builds the filesystem path as `path.join(staticPath, fallBackToIndex ? index : request.url)`. For file asset paths, `request.url` is used directly. A request URL such as `/../secret.txt` resolves outside `staticPath` and is then opened with `fs.open(requestPath, 'r')`. There is no URL normalization and no containment check that the resolved path remains under the configured static directory before the file is read and returned.\n\nThe proof boundary is the packaged CLI end-to-end run. The filesystem read primitive was validated with equivalent Node HTTP handling for the affected code path, including that Node preserves `/../secret.txt` in `request.url` and that bare `server.listen(port)` binds to all interfaces on this platform.\n\n### PoC\n\n1. Create a custom UI directory at `/tmp/logto-ui/static` with `/tmp/logto-ui/static/index.html`.\n2. Create a sibling file outside the static root, for example `/tmp/logto-ui/secret.txt`.\n3. Start the tunnel with `logto-tunnel --endpoint https://<tenant-id>.logto.app --port 9000 --experience-path /tmp/logto-ui/static`.\n4. Request `http://<host>:9000/../secret.txt`.\n5. The response body contains the contents of `/tmp/logto-ui/secret.txt`.\n\n### Impact\n\nThe observed result is arbitrary file read outside the configured custom UI static directory. If the tunnel port is reachable from another host, an unauthenticated network peer can read local files readable by the `logto-tunnel` process, including development secrets or credentials stored near the custom UI project.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@logto/tunnel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.9"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.3.8"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/logto-io/logto/security/advisories/GHSA-rxjr-6c9q-h67x"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/logto-io/logto/pull/9113"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/logto-io/logto/commit/5686815955534f803d3d50738259efd0f741e62c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/logto-io/logto"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/logto-io/logto/releases/tag/@logto/tunnel@0.3.9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-19T20:24:06Z",
    "nvd_published_at" : null
  }
}