Rembg: Unauthenticated SAM model injection permits local-file disclosure through malicious ONNX graphs
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| danielgatis | rembg | affected |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Danielgatis | Rembg |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-qr6x-7v33-6qmg | Rembg: Unauthenticated SAM model injection permits local-file disclosure through malicious ONNX graphs |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.394% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Danielgatis
Danielgatis rembg |
|
| Vendors & Products |
Danielgatis
Danielgatis rembg |
| Type | Values Removed | Values Added |
|---|---|---|
| Description | 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. | |
| Title | Rembg: Unauthenticated SAM model injection permits local-file disclosure through malicious ONNX graphs | |
| Weaknesses | CWE-22 | |
| References |
| |
| Metrics |
cvssV3_1
|