CVE-2021-43800
📋 TL;DR
This directory traversal vulnerability in Wiki.js allows attackers to read arbitrary files on Windows systems when specific storage modules are enabled. It affects Wiki.js servers running on Windows with local asset caching enabled, potentially exposing sensitive system files.
💻 Affected Systems
- Wiki.js
📦 What is this software?
Wiki.js by Requarks
⚠️ Risk & Real-World Impact
Worst Case
Complete file system disclosure including sensitive configuration files, credentials, and system files leading to full system compromise.
Likely Case
Exposure of sensitive application configuration files, user data, and potentially credentials stored in accessible directories.
If Mitigated
Limited impact if proper WAF filtering blocks malicious URLs or storage modules are disabled.
🎯 Exploit Status
Exploitation requires crafting special URLs with directory traversal sequences; no authentication needed.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.5.254
Vendor Advisory: https://github.com/Requarks/wiki/security/advisories/GHSA-r363-73gj-6j25
Restart Required: Yes
Instructions:
1. Backup your Wiki.js instance. 2. Update to version 2.5.254 or later via npm (npm update wiki.js) or download from GitHub releases. 3. Restart the Wiki.js service.
🔧 Temporary Workarounds
Disable local asset caching modules
windowsDisable any storage module with local asset caching capabilities (Local File System, Git) in Wiki.js configuration.
🧯 If You Can't Patch
- Implement web application firewall (WAF) rules to block URLs containing directory traversal sequences.
- Restrict file system permissions for the Wiki.js service account to minimal required directories.
🔍 How to Verify
Check if Vulnerable:
Check if Wiki.js version is below 2.5.254, running on Windows, with local asset caching storage modules enabled.
Check Version:
npm list wiki.js | grep wiki.js
Verify Fix Applied:
Confirm version is 2.5.254 or higher and verify path sanitization is functioning.
📡 Detection & Monitoring
Log Indicators:
- Unusual URL patterns with ../ sequences in access logs
- Failed file access attempts outside Wiki.js directories
Network Indicators:
- HTTP requests containing directory traversal sequences (../, ..\) to asset endpoints
SIEM Query:
source="wiki.js" AND (url="*../*" OR url="*..\\*")
🔗 References
- https://github.com/Requarks/wiki/commit/414033de9dff66a327e3f3243234852f468a9d85
- https://github.com/Requarks/wiki/releases/tag/2.5.254
- https://github.com/Requarks/wiki/security/advisories/GHSA-r363-73gj-6j25
- https://github.com/Requarks/wiki/commit/414033de9dff66a327e3f3243234852f468a9d85
- https://github.com/Requarks/wiki/releases/tag/2.5.254
- https://github.com/Requarks/wiki/security/advisories/GHSA-r363-73gj-6j25