Skip to content
Threat Feed
critical advisory

image-downloader: Path traversal arbitrary file write (CVE-2026-103648)

A critical path traversal vulnerability in the npm package image-downloader allows attackers to perform arbitrary file writes by providing a specially crafted percent-encoded URL.

CVE search metadata

CVE search record: CVE-2026-103648. Severity: critical. CVSS: 9.1. EPSS: 0.41%. KEV: no. Product: image-downloader (< 4.3.1). Brief: image-downloader: Path traversal arbitrary file write (CVE-2026-103648). Brief link: https://feed.craftedsignal.io/briefs/2026-10-cve-2026-103648-image-downloader/

Triage facts

Revision 1
Applicability
image-downloader (< 4.3.1)
Evidence
Unknown
Severity
Critical
Action
Immediate escalation
Sources
4 public sources
Freshness
Revision 1Oct 23, 16:37 UTC
Vulnerabilities
1 CVE
Source quality
A1Likely

CVE-2026-103648 is a critical path traversal vulnerability in the 'image-downloader' npm package. The vulnerability exists due to incorrect ordering of filename processing: the library calls path.basename() on a URL path before decodeURIComponent(). An attacker can supply a percent-encoded path traversal sequence (e.g., %2e%2e%2f) that bypasses the basename check, only to be decoded into a functional ../ sequence during path construction. This results in the application writing files outside the intended destination directory.

Attack Chain

  1. Attacker identifies a target application using image-downloader that accepts user-supplied URLs for image processing.
  2. Attacker hosts a malicious server or redirects a request to a controlled URL path.
  3. Attacker crafts a URL path containing percent-encoded traversal sequences (e.g., /%2e%2e%2f%2e%2e%2fetc/passwd).
  4. The vulnerable image-downloader package calls path.basename() on the encoded path, which fails to strip the traversal sequences because they contain no literal slashes.
  5. The library calls decodeURIComponent(), resolving the percent-encoded sequences into literal ../ traversal strings.
  6. path.join() concatenates the destination directory and the decoded traversal, resulting in a write operation outside the restricted directory.
  7. The application writes the content from the attacker-controlled URL to the chosen target path on the host filesystem.

Impact

Successful exploitation allows for arbitrary file writes on the host system. Depending on the environment and filesystem permissions, this can lead to remote code execution by overwriting configuration files, startup scripts, or authentication-related files such as .ssh/authorized_keys.

Recommendation

  • Upgrade image-downloader to version 4.3.1 or later immediately.
  • Audit applications utilizing the image-downloader library to ensure that user-supplied URLs are strictly validated or passed through a blocklist of traversal characters before processing.
  • Implement filesystem sandboxing or run processes with the principle of least privilege to limit the impact of potential arbitrary file write vulnerabilities.

Immediate actions

Upgrade all instances of image-downloader to version 4.3.1

IT Operations 24h

Threat Hunt

Identify applications using image-downloader and monitor for requests to the application containing percent-encoded path traversal characters.

T1190 high high confidence hunt now

Data: Web server access logs or application-level request logs

Mitigations

Apply patch to version 4.3.1

immediate IT Operations

CVE-2026-103648