# CVE-2026-115924: Rembg: Unauthenticated SAM model injection permits local-file disclosure through malicious ONNX graphs


- **Severity:** High 8.6 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 26 Oct 2026
- **Updated:** 26 Oct 2026
- **Also known as:** GHSA-qr6x-7v33-6qmg

## What is CVE-2026-115924?

CVE-2026-115924 is a high-severity vulnerability in danielgatis rembg, published on 26 Oct 2026. 

### Official 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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-115924?

2 open source packages ship an affected version, including rembg.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rembg` | PyPI | All versions | 2.0.82 |
| `rembg` | PyPI | All versions | 2.0.82 |

## How do I fix CVE-2026-115924?

Upgrade rembg to 2.0.82 or later.

## Is CVE-2026-115924 being exploited?

There is no known exploitation of CVE-2026-115924 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-115924 and fix it if it is affected.

What it is: CVE-2026-115924 is a high-severity vulnerability in danielgatis rembg, published on 26 Oct 2026. 
Exploitation: There is no known exploitation of CVE-2026-115924 in the wild and no public exploit code.

Affected packages and fixed versions:
- rembg (PyPI): affected all versions; fixed in 2.0.82
- rembg (PyPI): affected all versions; fixed in 2.0.82

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-115924/ (Markdown: https://insights.sbomify.com/CVE-2026-115924/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-115924
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-115924
- OSV: https://osv.dev/vulnerability/CVE-2026-115924

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-115924/
Summaries are generated and may contain mistakes; the official description above is the record.
