Rembg path traversal via SAM model parameter exposes local files
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
Rembg before 2.0.82 has a path traversal flaw (CWE-22) in how the public /api/remove endpoint handles the sam_model parameter. The value is used in local file paths and download URLs without a pinned hash check. An unauthenticated remote attacker can use crafted model names to make the server load malicious ONNX models that expose complete files readable by the rembg process, encoded into the returned PNG mask, and can run arbitrary ONNX computation.
Written with Claude Haiku 5.5 from the sources below · 2026-10-31
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| danielgatis | rembg | before 2.0.82 | 2.0.82 | Patch available | CNA |
| — | rembg (PyPI) | before 2.0.82 | 2.0.82 | Patch available | GHSA-qr6x-7v33-6qmg |
- rembg Vendordanielgatis Affected before 2.0.82 Fixed in 2.0.82 Patch available CNA
- rembg (PyPI) Vendor— Affected before 2.0.82 Fixed in 2.0.82 Patch available GHSA-qr6x-7v33-6qmg
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:danielgatis:rembg:*:*:*:*:*:*:*:* | — | — | danielgatis |
- cpe:2.3:a:danielgatis:rembg:*:*:*:*:*:*:*:* Versions — — ·danielgatis
Remediation
Update the PyPI package rembg to version 2.0.82, which fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-10-31
- Fix · CNA rembg (danielgatis) Fixed in 2.0.82
- Fix · GHSA-qr6x-7v33-6qmg rembg (PyPI) Fixed in 2.0.82 Advisory →
Timeline
- 2026-10-26 Threatist record created from CVE-2026-115924
- 2026-10-27 Alias added: GHSA-qr6x-7v33-6qmg
- 2026-10-27 Priority changed: MEDIUM → LOW
- 2026-10-31 CISA SSVC decision points changed
- 2026-10-31 Priority changed: LOW → HIGH
References
More danielgatis vulnerabilities
- TI-2026-28914 Rembg has a Path Traversal via Custom Model Loading CVSS 3.1MEDIUM 5.3
- TI-2025-18956 Rembg CORS misconfiguration CVSS 4.0HIGH 8.7
- TI-2025-18955 Rembg allows SSRF via /api/remove CVSS 4.0MEDIUM 6.9
Sources
- CVE-2026-115924 · CVE Program
- CVE-2026-115924 · NVD
- FIRST EPSS
- GHSA-qr6x-7v33-6qmg · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences