Skip to content

← Public intelligence

PyPI package

rembg

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.6PyPIAmendedPublished

    Rembg: Unauthenticated SAM model injection permits local-file disclosure through malicious ONNX graphs

    CVE-2026-115924 · GHSA-qr6x-7v33-6qmg

    Affected
    • PyPI rembg < 2.0.82
    Fixed in
    2.0.82· Vendor fix available
    Issue
    The public `/api/remove` endpoint uses attacker-controlled `extras.sam_model` in both SAM filenames and GitHub download URLs. Path traversal plus a URL fragment lets an unauthenticated attacker place malicious ONNX models beside a target file. The models read the file as ONNX external data and encode its bytes into the returned PNG. This issue affects SAM's `sam_model` in 2.0.81 and returns complete file contents. *Screenshot 1 — First unauthenticated request primes the path and returns HTTP 500.* Technical details `rembg/commands/s_command.py:188-223,384-397` accepts public `extras` JSON and passes it to `new_session()`. `rembg/sessions/sam.py:313-355` inserts `sam_model` into encoder/decoder filenames and fixed GitHub URLs, then invokes `pooch.retrieve()` without a pinned hash. Requests removes the URL `#fragment`; the local POSIX path retains it. Pooch creates attacker-selected parent directories without enforcing cache containment. The first request creates the path tree and…

    Recommended action: Upgrade to 2.0.82 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 4.3PyPIAmendedPublished

    rembg server is vulnerable to Server-Side Request Forgery (SSRF) and a weak default CORS configuration

    GHSA-55v6-g8pm-pw4c

    Affected
    • PyPI rembg < 2.0.75
    Fixed in
    2.0.75· Vendor fix available
    Issue
    GitHub Security Lab (GHSL) Vulnerability Report, rembg: GHSL-2024-161, GHSL-2024-162 The GitHub Security Lab team has identified potential security vulnerabilities in rembg. We are committed to working with you to help resolve these issues. In this report you will find everything you need to effectively coordinate a resolution of these issues with the GHSL team. If at any point you have concerns or questions about this process, please do not hesitate to reach out to us at securitylab@github.com (please include GHSL-2024-161 or GHSL-2024-162 as a reference). See also this blog post written by GitHub's Advisory Curation team which explains what CVEs and advisories are, why they are important to track vulnerabilities and keep downstream users informed, the CVE assigning process, and how they are used to keep open source software secure. If you are NOT the correct point of contact for this report, please let us know! Summary rembg server is vulnerable to Server-Side Request Forgery…

    Recommended action: Upgrade to 2.0.75 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 5.3PyPIAmendedPublished

    Rembg has a Path Traversal via Custom Model Loading

    CVE-2026-40086 · GHSA-3wqj-33cg-xc48

    Affected
    • PyPI rembg < 2.0.75
    Fixed in
    2.0.75· Vendor fix available
    Issue
    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 modelpath 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. CWE IDs: CWE-22 (Path Traversal), CWE-73 (External Control of File Name or Path) --- Details Vulnerable Code Flow The vulnerability exists in how the HTTP server handles the extras JSON parameter for custom model types (u2netcustom, discustom, bencustom). 1. Entry Point - rembg/commands/scommand.py The extras parameter is parsed as JSON and passed directly to newsession() without any validation. 2. Path Handling - rembg/sessions/u2netcustom.py The modelpath is returned with tilde expansion but no validation against path traversal. 3. File Read - rembg/sessions/base.py The path is passed to…

    Recommended action: Upgrade to 2.0.75 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →