Vulnerability record
Rembg: Unauthenticated SAM model injection permits local-file disclosure through malicious ONNX graphs
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…
8.6/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:LExploitability
AV:NAC:LPR:NUI:NScope
S:UImpact
C:HI:LA:LRemediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources