Public mode

No access to your tenant or devices. Every item links to its source. What this means

Some sources, documents or advisories need attention: 272/272 feeds/APIs · 469/469 docs · 8/9 advisories · checked 29 Oct 23:58 UTC Customize Public modeDiscuss ChangeIntel on Discord

coursevault-preview has a path traversal due to improper base-directory boundary validation

Exact source revision recorded 24 Oct 2026 13:17:17 UTC. It does not establish the source's current position. Latest evidence.

osv · GHSA-9h9m-rr67-9jpg

Published

## Summary `coursevault-preview` versions prior to `0.1.1` contain a path traversal vulnerability in the `resolveSafe` utility. The boundary check used `String.prototype.startsWith(baseDir)` on a normalized path, which does not enforce a directory boundary. An attacker who controls the `relativePath` argument to affected `CoursevaultPreview` methods may be able to read files outside the configured `baseDir` when a sibling directory exists whose name shares the same string prefix. ## Details The vulnerable code in `src/utils/errors.ts`: ```ts if (!full.startsWith(base)) { // ← insufficient throw new Error("Path escapes the base directory"); } ``` Because the check is a raw string prefix test rather than a path-boundary test, the following bypass is possible: ``` baseDir = "/srv/courses" payload = "../courses-admin/config.json" resolved = "/srv/courses-admin/config.json" "/srv/courses-admin/config.json".startsWith("/srv/courses") // → true ✗ ``` Any file whose absolute path begins with the `baseDir` string — including files in sibling directories that share a name prefix — passes the guard and can be accessed by the caller through affected file-access methods. The fix replaces the check with a separator-aware comparison: ```ts if (full !== base && !full.startsWith(base + sep)) { throw new Error("Path escapes the base directory"); } ``` ## Impact An application that passes untrusted input as the `relativePath` argument to affected file-access methods may expose file contents outside the intended directory. 1. Attacker control over the `relativePath` parameter. 2. A sibling directory on the filesystem whose name shares a string prefix with `baseDir`. There is no network exposure in the package itself; impact is limited to local file disclosure within the host process's file system permissions.

Source published
8 Apr 2026 00:06:03 UTC
Source modified
8 Apr 2026 00:27:17 UTC
Observed here
24 Oct 2026 13:17:17 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.

CVSS_V3 · CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Publisher rating · MODERATE

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 29 Oct 23:58 UTC · 272 of 272 readable · 271 fully read · documentation 469/469 current