Skip to main content

rembg EUVDEUVD-2026-110073

| CVE-2026-115924 HIGH
Path Traversal (CWE-22)
2026-10-26 GitHub_M GHSA-qr6x-7v33-6qmg
8.6
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted extras.sam_model to public /api/remove
  2. Delivery
    First request primes attacker path tree (HTTP 500)
  3. Exploit
    Identical repeat request downloads malicious ONNX encoder/decoder
  4. Execution
    ONNX graph reads target file via external data
  5. Impact
    Target bytes encoded into returned PNG mask (file disclosure)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires rembg (prior to 2.0.82) running in HTTP server mode with the public /api/remove endpoint reachable by the attacker, who supplies attacker-controlled extras.sam_model JSON; no authentication is needed (PR:N). The attack specifically needs a sam_model value combining path traversal with URL-fragment syntax so the HTTP request drops the '#fragment' while the local POSIX path retains it, and it requires two identical requests (the first primes the attacker-selected directory tree and returns HTTP 500, the second downloads the malicious ONNX assets and returns the encoded PNG). The disclosed data is limited to files readable by the rembg process under its filesystem permissions - the advisory's demonstration ran the container as root, which maximized reach to /flag and /etc/passwd; a non-root, read-only-root-filesystem deployment constrains the impact.

Impact

This is a genuinely high-priority issue rather than a high-CVSS-but-low-real-risk one, though its reach is gated by deployment mode. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L, computing to 8.6) describes a network-reachable, unauthenticated, low-complexity attack against the public /api/remove endpoint, with high confidentiality impact (complete file disclosure) plus limited integrity/availability impact from writing attacker ONNX assets to disk. The vuln.today decision label is 'this_week' (not act_now/emergency). A public PoC reference exists in the GHSA advisory (attached scripts), but it is a loopback-only lab demonstration and is not verified as a weaponized in-the-wild exploit - POC availability must not be conflated with active exploitation. No CISA KEV listing is present and no EPSS score was supplied, so widespread-versus-targeted exploitation cannot be gauged from the input; the absence of KEV/EPSS is a data gap, not evidence of low risk. The practical limiter is that the host must be running rembg in HTTP server mode with /api/remove exposed, and impact is bounded by the filesystem permissions of the rembg process (the advisory's root-running container exposed /flag and /etc/passwd).

Exploit ScenarioDerived

An unauthenticated attacker reaches a publicly exposed rembg /api/remove endpoint and submits an extras.sam_model value that combines path traversal with URL-fragment syntax, exploiting the fact that the HTTP client discards the URL '#fragment' while the local POSIX path keeps it. The first request primes the attacker-chosen directory tree (returning HTTP 500) and an identical second request fetches malicious ONNX encoder/decoder files beside a readable target file; the graph reads that file via ONNX external data and encodes its bytes into the returned PNG mask, which the attacker decodes back to the original file. A public PoC reference exists (loopback-only), demonstrating disclosure of /etc/passwd and a synthetic /flag.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 26, 2026

Unauthenticated file disclosure and arbitrary ONNX computation in rembg prior to 2.0.82: the public /api/remove endpoint forwards an attacker-supplied extras.sam_model value into SAM model download logic, where it is interpolated into local filenames and GitHub download URLs passed to pooch.retrieve() without a pinned hash. By combining path traversal with URL-fragment syntax - the HTTP request discards the '#fragment' while the local POSIX path keeps it - an attacker who can reach the HTTP server mode endpoint primes a directory tree with a first request (HTTP 500) and then, with an identical second request, plants malicious ONNX encoder/decoder files beside a target file; those graphs read the target via ONNX external data and encode its bytes into the returned PNG mask. No authentication is required (CVSS 3.1 AV:N/AC:L/PR:N/UI:N, 8.6), impact is bounded by what the rembg process can read, and the vendor advisory includes proof-of-concept scripts validated against a loopback lab deployment; no CISA KEV entry exists and the vendor fix ships in v2.0.82.

RemediationAI

Upgrade rembg to 2.0.82, which introduces the SAM_MODELS allowlist and the SAM_CHECKSUMS md5 pinning that stop an attacker-controlled sam_model from steering a download URL or a local path (release: https://github.com/danielgatis/rembg/releases/tag/v2.0.82, fix commit: https://github.com/danielgatis/rembg/commit/b2758c6b39bb2b02df90a03128110339476984d3, advisory: https://github.com/danielgatis/rembg/security/advisories/GHSA-qr6x-7v33-6qmg). Where upgrading is not immediately possible, the vendor's compensating measures should be applied together: run the container under a non-root user and with a read-only root filesystem, which caps disclosure to what an unprivileged process can reach instead of the /etc/passwd and /flag reach demonstrated in the root-running lab container - the trade-off is that rembg loses write access to its REMBG_HOME model cache unless a writable volume is mounted there; and restrict or disable public access to the /api/remove endpoint (authentication proxy or network allowlist) - the trade-off is that legitimate remote inference clients must be re-routed or authenticated. Note that the advisory's own remediation guidance frames a server-side allowlist mapping identifiers to fixed filenames, URLs and pinned hashes as the complete fix, so network-level blocking alone leaves the traversal logic in place for any caller that can reach the endpoint.

Affected VersionsENISA

rembg < 2.0.82

Affected Packages

pypi rembg fix: 2.0.82

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

rembg is a Python background-removal library that also exposes an HTTP service; its SAM (Segment Anything Model) session stored in rembg/sessions/sam.py downloads ONNX encoder and decoder checkpoints at runtime through pooch.retrieve(). The user-controlled sam_model field arrives from the public extras JSON of /api/remove, travels through rembg/commands/s_command.py into new_session(), and was concatenated directly into both the release-asset download URL and the local cache filename (CWE-22, path traversal). Because pooch created attacker-selected parent directories without enforcing cache containment, and because no checksum was supplied to pooch.retrieve(), the fetched artefact was neither confined nor integrity-checked. The distinguishing trick is a URL fragment: '#' is stripped by the HTTP layer but retained in the local POSIX path, so a single string can address a legitimate-looking GitHub URL while writing to a traversed local directory. The planted ONNX graphs then use a relative external-tensor reference to read a neighbouring file and map each byte onto mask pixels, which rembg renders back as a PNG the attacker decodes - a data-exfiltration channel via model graph semantics rather than a classic file-read primitive. The upstream commit b2758c6 replaces the raw interpolation with a SAM_MODELS allowlist (sam_vit_b_01ec64, sam_vit_l_0b3195, sam_vit_h_4b8939) rejected via ValueError before pooch is ever called, and pins md5 digests for every release asset in a SAM_CHECKSUMS table (honouring an explicit checksum-disabled opt-out); accompanying tests assert that injected names never reach a URL or path and that every allowed checkpoint has pinned digests.

Know when Rembg gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.6 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
vuln.today AI 8.6 HIGH

Public unauthenticated /api/remove endpoint gives AV:N/PR:N/UI:N; the scripted two-request fragment trick is deterministic so AC:L; full file read is C:H with planted ONNX files giving I:L/A:L.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
Low

Lifecycle Timeline

2
Patch available
Oct 26, 2026 - 20:18 EUVD
CVE Published
Oct 26, 2026 - 19:22 cve.org
HIGH 8.6

DescriptionCVE.org

Rembg is a tool to remove images background. Prior to 2.0.82, the public /api/remove endpoint passes attacker-controlled extras.sam_model through rembg/commands/s_command.py to rembg/sessions/sam.py, where it is interpolated into SAM filenames and GitHub download URLs passed to pooch.retrieve() without a pinned hash. An unauthenticated attacker can supply a sam_model value combining path traversal with URL fragment syntax to exploit the HTTP request discarding the fragment while the local POSIX path retains it. The first request primes the attacker-selected path tree, and an identical repeated request downloads malicious ONNX encoder and decoder files beside a readable target file. The graphs can load the target through ONNX external data and encode its bytes into the returned PNG mask, disclosing complete files accessible to the rembg process and allowing arbitrary ONNX computation. This issue is fixed in version 2.0.82.

Technical POC Analysis

CWE-22 (Improper Limitation of a Pathname to a Restricted Directory / Path Traversal), with a URL-parsing twist.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity unauthenticated flaw in rembg (a widely used background-removal image processing library, in versions prior to 2.0.82) lets anyone who can reach the service's HTTP endpoint exfiltrate files the service process can access and trigger arbitrary ONNX model execution. Because no credentials are required, any internet- or network-reachable deployment of rembg in HTTP server mode becomes an open data-exposure surface, putting sensitive files readable by the service account at risk. Leadership should care because remediation is not yet available from the vendor and exposure scales directly with how broadly the endpoint is reachable.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict network access to the /api/remove endpoint, require authentication at a reverse proxy, run under a least-privilege service account, block outbound access to model-download URLs, reject untrusted extras.sam_model inputs, and monitor for repeated identical requests accompanied by HTTP 500 errors.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Low
popular image-background library, but public /api/remove server deployment is niche/self-hosted
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy