CVE-2026-35613 — coursevault-preview
MEDIUMCVE-2026-35613 is a medium-severity (CVSS 5.1) Path Traversal vulnerability in coursevault-preview. A fix is available for coursevault-preview — see the affected versions and patch details below.
Path traversal in coursevault-preview due to improper base-directory boundary validation
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-35613.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-35613 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 379,842 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
coursevault-previewnpmDescription
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:
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:
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.
- Attacker control over the
relativePathparameter. - 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | coursevault-preview | all versions | 0.1.1npm install coursevault-preview@0.1.1 |
Affected Products
coursevault-previewmoritzmyrzDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for coursevault-preview, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update coursevault-preview to 0.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-35613 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is CVE-2026-35613 in your dependencies?
Find it across npm, including transitive dependencies.