Skip to main content
CVE Vulnerability Database

CVE-2026-9472: Markdown Downloader Path Traversal Flaw

CVE-2026-9472 is a path traversal vulnerability in dazeb markdown-downloader that allows remote attackers to manipulate file paths. This article covers the technical details, affected code, impact, and mitigation.

Published:

CVE-2026-9472 Overview

CVE-2026-9472 is a path traversal vulnerability [CWE-22] in the dazeb markdown-downloader project up to commit 3d4394b34b6c99d81af817623af55e3384df5a6a. The flaw affects the download_markdown, list_downloaded_files, and create_subdirectory functions in src/index.ts. An attacker can manipulate input parameters to traverse directories outside the intended download location. The attack can be launched remotely and requires low privileges. A public exploit has been disclosed, and the project does not use traditional versioning, making patched and unpatched releases difficult to distinguish.

Critical Impact

Remote attackers with low privileges can read, write, or enumerate files outside the intended directory through path traversal in three exposed functions.

Affected Products

  • dazeb/markdown-downloader repository up to commit 3d4394b34b6c99d81af817623af55e3384df5a6a
  • Affected file: src/index.ts
  • Affected functions: download_markdown, list_downloaded_files, create_subdirectory

Discovery Timeline

  • 2026-05-25 - CVE-2026-9472 published to NVD
  • 2026-05-26 - Last updated in NVD database

Technical Details for CVE-2026-9472

Vulnerability Analysis

The vulnerability resides in three functions inside src/index.ts: download_markdown, list_downloaded_files, and create_subdirectory. These functions accept user-supplied path or filename input without proper canonicalization or boundary checks. An attacker can supply traversal sequences such as ../ to access files and directories outside the application's intended working directory.

The issue is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory. Exploitation does not require user interaction. The project maintainers were notified through an issue report but have not yet responded, and the project does not maintain versioned releases.

Root Cause

The root cause is missing input sanitization on path-related parameters. The three vulnerable functions construct filesystem paths by concatenating user input with a base directory without resolving and verifying that the final path stays inside the allowed root. Functions like path.resolve followed by a prefix check against the intended directory are absent.

Attack Vector

The attack vector is network-based with low privileges and no user interaction. An attacker invokes any of the three exposed functions and supplies a crafted filename or path argument containing directory traversal sequences. This enables reading downloaded markdown content from arbitrary locations, writing files to attacker-chosen paths, or enumerating directories outside the project root. Refer to the GitHub Issue #12 and the VulDB entry #365453 for additional technical context. No verified exploit code is reproduced here.

Detection Methods for CVE-2026-9472

Indicators of Compromise

  • Filesystem access logs showing the markdown-downloader process reading or writing files outside its configured download directory.
  • Function call traces or application logs containing ../ sequences passed to download_markdown, list_downloaded_files, or create_subdirectory.
  • Unexpected files appearing in sensitive system paths after invocations of the downloader.

Detection Strategies

  • Inspect application logs for path parameters containing traversal patterns such as ../, ..\\, URL-encoded %2e%2e%2f, or absolute paths.
  • Compare the resolved canonical path of each request against the intended base directory and alert on mismatches.
  • Static analysis of src/index.ts to flag concatenation of user input into filesystem paths without canonicalization.

Monitoring Recommendations

  • Monitor process-level file access events for the Node.js runtime hosting markdown-downloader.
  • Capture and alert on any write operations outside the designated download directory.
  • Track invocations of the three affected functions and store their input parameters for forensic review.

How to Mitigate CVE-2026-9472

Immediate Actions Required

  • Restrict network exposure of the markdown-downloader service to trusted clients only.
  • Run the application under a dedicated low-privilege user with filesystem access limited to the download directory.
  • Audit the three affected functions and apply local patches that canonicalize and validate paths before filesystem operations.

Patch Information

No official patch has been released. The maintainer was notified through GitHub Issue #12 but has not responded. Because the project does not use versioning, downstream consumers should pin to a known-good commit and apply local fixes that validate paths with path.resolve and ensure the resolved path remains within the intended base directory.

Workarounds

  • Sandbox the process using OS-level controls such as containers, chroot, AppArmor, or SELinux to constrain filesystem access.
  • Place a reverse proxy or API gateway in front of the service to filter requests containing traversal sequences.
  • Apply a local code fix that rejects any input where the resolved path does not start with the configured download root.
bash
# Configuration example: constrain the downloader with a least-privilege user and a dedicated directory
sudo useradd -r -s /usr/sbin/nologin mddl
sudo mkdir -p /var/lib/markdown-downloader/downloads
sudo chown -R mddl:mddl /var/lib/markdown-downloader
sudo chmod 750 /var/lib/markdown-downloader/downloads
# Run the service as the restricted user
sudo -u mddl node /opt/markdown-downloader/src/index.js

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.