{"id":"CVE-2026-115924","kind":"vulnerability","aliases":["CVE-2026-115924"],"related":[],"title":"Rembg: unauthenticated sam_model injection reads server files and runs ONNX code","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.","summary":"Rembg, a Python tool that removes image backgrounds, passed an attacker-controlled sam_model value from its public /api/remove endpoint into SAM model filenames and download URLs without pinning hashes. A remote, unauthenticated attacker can make the server download malicious ONNX models and read complete files the rembg process can access, returning their bytes in the PNG mask.","severity":"high","cvss":8.6,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["package","python","rembg","self-hosted"],"not_affected_if":["auth-required","default-config"],"how_to_check":"- Run `pip show rembg` and compare the version with `2.0.82`\n- Check whether the service exposes the /api/remove endpoint to untrusted networks (unknown if the sources list the exact deployment setup)","fix":"- Upgrade rembg to `2.0.82` or later\n- Until upgraded, block or restrict access to the /api/remove endpoint","status":"open","published_at":"2026-10-26T20:17:52+00:00","first_seen_at":"2026-10-26T20:50:17+00:00","triaged_at":"2026-10-26T20:51:37+00:00","updated_at":"2026-10-26T20:51:37+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-26T20:51:37Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade rembg to `2.0.82` or later\n- Until upgraded, block or restrict access to the /api/remove endpoint","reach":"internet","title":"Rembg: unauthenticated sam_model injection reads server files and runs ONNX code","impact":"high","summary":"Rembg, a Python tool that removes image backgrounds, passed an attacker-controlled sam_model value from its public /api/remove endpoint into SAM model filenames and download URLs without pinning hashes. A remote, unauthenticated attacker can make the server download malicious ONNX models and read complete files the rembg process can access, returning their bytes in the PNG mask.","category":"package","nicknames":[],"who_cares":["python","self-hosted","rembg"],"confidence":0.7,"needs_auth":"no","worst_case":"Server files readable by rembg are disclosed; arbitrary ONNX computation runs","analyst_note":"Confirm whether /api/remove is enabled by default in the rembg server and whether the exposure requires the SAM session path; check the NVD and GitHub advisory for the exact affected range.","how_to_check":"- Run `pip show rembg` and compare the version with `2.0.82`\n- Check whether the service exposes the /api/remove endpoint to untrusted networks (unknown if the sources list the exact deployment setup)","needs_analyst":true,"not_affected_if":["auth-required","default-config"],"who_is_affected":"Teams running rembg 2.0.81 or earlier as a web service that exposes the public /api/remove endpoint to untrusted users are exposed, because the sam_model parameter is reachable without authentication. Teams using rembg only as a local library or command line tool without the HTTP API, or running an upgraded version, can skip it.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000669,"input_tokens":3507,"output_tokens":636,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-115924':15A,18A '-2026':14A,17A '/api/remove':44B,97C '2.0.82':94C,223C 'access':76B,207C 'allow':213C 'arbitrari':214C 'attack':36B,59B,101C,129C,164C 'attacker-control':35B,100C 'attacker-select':163C 'background':32B,91C 'besid':180C 'byte':79B,198C 'code':12A 'combin':136C 'complet':70B,205C 'comput':216C 'control':37B,102C 'cve':13A,16A 'data':194C 'decod':178C 'discard':148C 'disclos':204C 'download':51B,64B,118C,173C 'encod':176C,196C 'endpoint':45B,98C 'exploit':144C 'extern':193C 'extras.sam':103C 'file':8A,71B,179C,184C,206C 'filenam':49B,115C 'first':159C 'fix':220C 'fragment':141C,150C 'github':117C 'graph':186C 'hash':55B,126C 'host':24B 'http':146C 'ident':170C 'imag':31B,90C 'inject':5A 'interpol':112C 'issu':218C 'load':188C 'local':153C 'make':61B 'malici':65B,174C 'mask':83B,203C 'model':4A,39B,48B,67B,104C,134C 'onnx':11A,66B,175C,192C,215C 'packag':19B 'pass':33B,99C,120C 'path':137C,155C,166C 'pin':54B,125C 'png':82B,202C 'pooch.retrieve':122C 'posix':154C 'prime':161C 'prior':92C 'process':74B,211C 'public':43B,96C 'python':20B,27B 'read':6A,69B 'readabl':182C 'rembg':1A,21B,25B,73B,84C,210C 'rembg/commands/s_command.py':106C 'rembg/sessions/sam.py':108C 'remot':57B 'remov':30B,89C 'repeat':171C 'request':147C,160C,172C 'retain':156C 'return':77B,201C 'run':10A 'sam':3A,38B,47B,114C,133C 'select':165C 'self':23B 'self-host':22B 'server':7A,63B 'suppli':131C 'syntax':142C 'target':183C,190C 'tool':28B,87C 'travers':138C 'tree':167C 'unauthent':2A,58B,128C 'url':52B,119C,140C 'valu':40B,135C 'version':222C 'without':53B,123C","nicknames":[],"mitigations":[],"who_affected":"Teams running rembg 2.0.81 or earlier as a web service that exposes the public /api/remove endpoint to untrusted users are exposed, because the sam_model parameter is reachable without authentication. Teams using rembg only as a local library or command line tool without the HTTP API, or running an upgraded version, can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-26T20:17:52+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-115924","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115924","severity":null,"published_at":"2026-10-26T20:17:52+00:00","modified_at":"2026-10-26T20:17:52+00:00","first_seen_at":"2026-10-26T20:50:17+00:00","fetched_at":"2026-10-26T20:50:17+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}