Vulnerabilities in pkg:npm/coursevault-preview
PACKAGECVE-2026-35613 is a MODERATE (CVSS 5.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Coursevault preview libraries in the npm ecosystem. The issue involves coursevault-preview has a path traversal due to improper base-directory boundary validation. Remediation is available by upgrading affected packages to version 0.1.1.
pkg:npm/coursevault-preview
Vulnerability advisories affecting package pkg:npm/coursevault-preview. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9h9m-rr67-9jpg | CVE-2026-35613 | MODERATE | coursevault-preview has a path traversal due to improper base-directory boundary validation |
CVE-2026-35613 at a Glance
Security Impact
CVSS: 5.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-35613
To remediate this vulnerability, upgrade all affected Coursevault preview dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install coursevault-preview@0.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls coursevault-preview
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-35613, inspect your project dependencies using npm:
npm ls coursevault-preview
Analyze the terminal output to locate any version of Coursevault preview in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.1), your application is affected.
Note: The npm ls coursevault-preview 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 Coursevault preview, 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
CVE-2026-35613 Affected Coursevault preview Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
coursevault-preview
|
npm |
< 0.1.1
|
0.1.1
|
References
Frequently Asked Questions
What is CVE-2026-35613?
Which Coursevault preview versions are affected?
What version fixes CVE-2026-35613?
Is coursevault-preview affected?
What is the CVSS score of CVE-2026-35613?
What CWE is associated with CVE-2026-35613?
How can I check npm dependencies for CVE-2026-35613?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9h9m-rr67-9jpg",
"modified" : "2026-04-08T00:06:03Z",
"published" : "2026-04-08T00:06:03Z",
"aliases" : [ "CVE-2026-35613" ],
"summary" : "coursevault-preview has a path traversal due to improper base-directory boundary validation",
"details" : "## Summary\n\n`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.\n\n## Details\n\nThe vulnerable code in `src/utils/errors.ts`:\n\n```ts\nif (!full.startsWith(base)) { // ← insufficient\n throw new Error(\"Path escapes the base directory\");\n}\n```\n\nBecause the check is a raw string prefix test rather than a path-boundary test, the following bypass is possible:\n\n```\nbaseDir = \"/srv/courses\"\npayload = \"../courses-admin/config.json\"\nresolved = \"/srv/courses-admin/config.json\"\n\n\"/srv/courses-admin/config.json\".startsWith(\"/srv/courses\") // → true ✗\n```\n\nAny 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.\n\nThe fix replaces the check with a separator-aware comparison:\n\n```ts\nif (full !== base && !full.startsWith(base + sep)) {\n throw new Error(\"Path escapes the base directory\");\n}\n```\n\n## Impact\n\nAn application that passes untrusted input as the `relativePath` argument to affected file-access methods may expose file contents outside the intended directory.\n\n1. Attacker control over the `relativePath` parameter.\n2. A sibling directory on the filesystem whose name shares a string prefix with `baseDir`.\n\nThere is no network exposure in the package itself; impact is limited to local file disclosure within the host process's file system permissions.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "coursevault-preview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/moritzmyrz/coursevault-preview/security/advisories/GHSA-9h9m-rr67-9jpg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35613"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/moritzmyrz/coursevault-preview"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-08T00:06:03Z",
"nvd_published_at" : "2026-04-07T17:16:35Z"
}
}