CVE-2026-40086: Rembg has a Path Traversal via Custom Model Loading
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.
CWE IDs: CWE-22 (Path Traversal), CWE-73 (External Control of File Name or Path)
References
- github.com/advisories/GHSA-3wqj-33cg-xc48
- github.com/danielgatis/rembg
- github.com/danielgatis/rembg/commit/7c76d3cdc5757ffbda6a76664b24cfbecdb80273
- github.com/danielgatis/rembg/releases/tag/v2.0.75
- github.com/danielgatis/rembg/security/advisories/GHSA-3wqj-33cg-xc48
- nvd.nist.gov/vuln/detail/CVE-2026-40086
Code Behaviors & Features
Detect and mitigate CVE-2026-40086 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →