CVE-2026-40086

Rembg has a Path Traversal via Custom Model Loading

Published Apr 10, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
Rembg is a tool to remove images background. Prior to 2.0.75, a path traversal vulnerability in the rembg HTTP server allows unauthenticated remote attackers to read arbitrary files from the server's filesystem. By sending a crafted request with a malicious model_path parameter, an attacker can force the server to attempt loading any file as an ONNX model, revealing file existence, permissions, and potentially file contents through error messages. This vulnerability is fixed in 2.0.75.

Analysis

AI-generated

Technical impact

The vulnerability allows an unauthenticated attacker to craft a request that forces the Rembg HTTP server to load a file as an ONNX model, potentially revealing file existence, permissions, and content through error messages. This path traversal weakness is captured by CWE‑22 and CWE‑73 and results in unauthorized read of arbitrary server files.

Affected Systems

The issue affects the danielgatis rembg tool prior to version 2.0.75. Any deployments running 2.0.74 or earlier are susceptible, regardless of operating system, when the custom model loading feature is exposed via the HTTP API.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity. Exploitation requires sending a crafted HTTP request, which remote actors could perform without authentication. No EPSS data is available, and the vulnerability is not listed in the CISA KEV catalog, suggesting it is not widely exploited yet. Nonetheless, the ability to read arbitrary files poses a significant confidentiality risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to Rembg v2.0.75 or later
  • If an update cannot be applied immediately, disable or restrict access to the custom model loading endpoint, or enforce strict input validation to prevent traversal of the file system

Generated by OpenCVE AI on April 10, 2026 at 17:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-3wqj-33cg-xc48 Rembg has a Path Traversal via Custom Model Loading
History
Type Values Removed Values Added
CPEs cpe:2.3:a:danielgatis:rembg:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Danielgatis
Danielgatis rembg
Vendors & Products Danielgatis
Danielgatis rembg
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Rembg is a tool to remove images background. Prior to 2.0.75, a path traversal vulnerability in the rembg HTTP server allows unauthenticated remote attackers to read arbitrary files from the server's filesystem. By sending a crafted request with a malicious model_path parameter, an attacker can force the server to attempt loading any file as an ONNX model, revealing file existence, permissions, and potentially file contents through error messages. This vulnerability is fixed in 2.0.75.
Title Rembg has a Path Traversal via Custom Model Loading
Weaknesses CWE-22
CWE-73
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-73

    External Control of File Name or Path

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 10, 2026, 6:29 PM
Reserved
Apr 9, 2026, 12:39 AM
Status
Analyzed
Published
Apr 10, 2026, 5:17 PM
Modified
Oct 26, 2026, 10:10 PM