Skip to main content
Vulnerability Database/CVE-2026-103648

CVE-2026-103648: image-downloader Path Traversal Vulnerability

CVE-2026-103648 is a path traversal vulnerability in image-downloader 4.3.0 that enables attackers to write files outside the intended directory by manipulating download URLs. This article covers technical details, impact analysis, and mitigation strategies.

Published:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-103648 Overview

CVE-2026-103648 is a path traversal vulnerability [CWE-22] in the image-downloader package version 4.3.0. The flaw allows an attacker who controls the download URL to write response data outside the configured destination directory. The issue arises because the library does not sanitize path components derived from the remote URL before writing files to disk.

Successful exploitation lets an attacker overwrite arbitrary files accessible to the Node.js process. This can corrupt configuration files, inject code into application assets, or disrupt availability of the host.

Critical Impact

An unauthenticated remote attacker who controls or influences the download URL can write files to arbitrary paths, enabling integrity compromise and denial of service against the affected host.

Affected Products

  • image-downloader npm package, version 4.3.0
  • Node.js applications that pass attacker-influenced URLs to the library
  • Downstream projects embedding the vulnerable version via transitive dependencies

Discovery Timeline

  • 2026-10-02 - CVE-2026-103648 published to the National Vulnerability Database
  • 2026-10-03 - Last updated in NVD database

Technical Details for CVE-2026-103648

Vulnerability Analysis

The image-downloader library accepts a URL and a destination directory, then writes the fetched response body to a file on disk. In version 4.3.0, the file name used for the write operation is derived from the remote URL without stripping directory traversal sequences.

When the URL path contains sequences such as ../, the library resolves the output path above the configured destination directory. This permits writes to any location the Node.js process can reach on the filesystem. The vulnerability does not require authentication or user interaction, and it can be triggered over a network path if the application exposes URL input to remote clients.

The impact is scoped to integrity and availability. Confidentiality is unaffected because the primitive is a write, not a read.

Root Cause

The root cause is missing validation and canonicalization of the file name component used to construct the output path. The library trusts the URL-derived name and joins it directly with the destination directory. There is no check that the resolved path remains within the intended base directory.

Attack Vector

An attacker supplies a URL whose path or final segment contains traversal sequences such as ..%2f..%2fetc%2fcron.d%2fmalicious. When the application invokes the download function, the library writes the HTTP response body to the attacker-chosen location. Attackers can target application configuration, startup scripts, or web-served static assets to achieve code execution or persistence.

For technical details, see the upstream fix in the GitLab commit log and the GitLab work item overview.

Detection Methods for CVE-2026-103648

Indicators of Compromise

  • Files created outside the application's intended download directory, especially under system paths such as /etc, /var/spool/cron, or web roots
  • Download requests to URLs whose path components contain .., %2e%2e, or encoded slash sequences
  • Unexpected modifications to configuration files, startup scripts, or static assets owned by the Node.js process user

Detection Strategies

  • Inventory Node.js dependencies with Software Composition Analysis (SCA) tooling and flag image-downloader at version 4.3.0
  • Instrument the application to log every destination path produced by the library and alert when the resolved path escapes the configured base directory
  • Review HTTP access logs for request parameters containing traversal sequences passed to endpoints that invoke image downloads

Monitoring Recommendations

  • Enable filesystem auditing on directories that host application code, configuration, and web content
  • Correlate outbound HTTP fetches from the application process with subsequent file write events in unexpected locations
  • Monitor process behavior for new executable or script files written by the Node.js runtime user

How to Mitigate CVE-2026-103648

Immediate Actions Required

  • Upgrade image-downloader to a version that includes the fix referenced in the upstream GitLab commit
  • Audit application code for any path that passes untrusted URLs into the library and restrict input where feasible
  • Run the application process under a least-privilege account that cannot write to sensitive system directories

Patch Information

The upstream project addressed the issue in commit fb4454304276e2439fb19b98836b3ba903b3aaea. Review the GitLab commit log and the GitLab work item overview for the exact changes and release metadata. Update package.json to the fixed version and regenerate the lockfile.

Workarounds

  • Validate and canonicalize URLs before invoking the downloader, rejecting any path containing .. or encoded traversal sequences
  • Override the output filename explicitly rather than letting the library derive it from the URL
  • After download, verify that the resolved file path remains within the intended destination directory using path.resolve comparisons
bash
# Upgrade the vulnerable dependency
npm ls image-downloader
npm update image-downloader
npm audit

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

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.