# CVE-2026-35613: Path traversal in coursevault-preview due to improper base-directory boundary validation

> An attacker can read files outside the configured directory by exploiting a path traversal flaw in the coursevault-preview library.

- **Severity:** Medium 5.1 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Apr 2026
- **Updated:** 9 Apr 2026
- **Also known as:** GHSA-9h9m-rr67-9jpg

## What is CVE-2026-35613?

CVE-2026-35613 is a medium-severity path traversal vulnerability in moritzmyrz coursevault-preview, published on 7 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

coursevault-preview is a utility for previewing course material files from a configured directory. 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. This vulnerability is fixed in 0.1.1.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-35613?

2 open source packages ship an affected version, including coursevault-preview. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `coursevault-preview` | npm | All versions | 0.1.1 |
| `coursevault-preview` | npm | All versions | 0.1.1 |

Products: Moritzmyrz Coursevault-Preview.

## How do I fix CVE-2026-35613?

Upgrade coursevault-preview to 0.1.1 or later.

## Is CVE-2026-35613 being exploited?

There is no known exploitation of CVE-2026-35613 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-35613 and fix it if it is affected.

What it is: CVE-2026-35613 is a medium-severity path traversal vulnerability in moritzmyrz coursevault-preview, published on 7 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-35613 in the wild and no public exploit code.

Affected packages and fixed versions:
- coursevault-preview (npm): affected all versions; fixed in 0.1.1
- coursevault-preview (npm): affected all versions; fixed in 0.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-35613/ (Markdown: https://insights.sbomify.com/CVE-2026-35613/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-35613
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-35613
- OSV: https://osv.dev/vulnerability/CVE-2026-35613

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-35613/
Summaries are generated and may contain mistakes; the official description above is the record.
