CVE-2026-115924

CVE-2026-115924 is a high-severity path traversal vulnerability in rembg (pip), affecting versions < 2.0.82. It is fixed in 2.0.82.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Rembg: Unauthenticated SAM model injection permits local-file disclosure through malicious ONNX graphs

The public /api/remove endpoint uses attacker-controlled extras.sam_model in both SAM filenames and GitHub download URLs. Path traversal plus a URL fragment lets an unauthenticated attacker place malicious ONNX models beside a target file. The models read the file as ONNX external data and encode its bytes into the returned PNG.

This issue affects SAM's sam_model in 2.0.81 and returns complete file contents.

Screenshot 1, First unauthenticated request primes the path and returns HTTP 500.

Technical details

rembg/commands/s_command.py:188-223,384-397 accepts public extras JSON and passes it to new_session(). rembg/sessions/sam.py:313-355 inserts sam_model into encoder/decoder filenames and fixed GitHub URLs, then invokes pooch.retrieve() without a pinned hash.

Requests removes the URL #fragment; the local POSIX path retains it. Pooch creates attacker-selected parent directories without enforcing cache containment. The first request creates the path tree and returns HTTP 500. The identical second request downloads the attacker asset twice and stores it as both SAM models beside the target.

The graph uses a relative external tensor to read the target and maps every byte to mask pixels. rembg returns the mask as a PNG, which the attacker decodes back into the original bytes.

Screenshot 2, The identical second request returns HTTP 200 with an encoded PNG.

Proof of concept

The attached loopback-only PoC produced:

VULNERABLE: unauthenticated SAM model injection disclosed the synthetic /flag
first-http=500 second-http=200
decoded-value=REMBG_AUDIT_SYNTHETIC_FLAG_2026_08_28

The /etc/passwd variant produced:

VULNERABLE: disclosed /etc/passwd (839 bytes)
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
...
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin

The decoded contents matched /etc/passwd inside the owned container. Testing used a local TLS stand-in for GitHub; no public target was contacted.

Screenshot 3, The decoder reconstructs all 839 bytes of /etc/passwd.

Impact

An unauthenticated attacker can execute arbitrary ONNX computation and disclose complete files that rembg can reach under the required filesystem permissions. The supplied root-running container exposed both /flag and /etc/passwd.

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

CVE-2026-115924 has a CVSS score of 8.6 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.0.82); upgrading removes the vulnerable code path.

Affected versions

rembg (< 2.0.82)

Security releases

rembg → 2.0.82 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Allow only fixed SAM identifiers mapped server-side to fixed filenames, URLs, and pinned hashes. Reject path and URL syntax; canonicalize destinations and enforce cache containment before creating directories. Run the container as a non-root user with a read-only root filesystem.

decode_samfragment_png.py
samfragment_04.py
samfragment_etc_passwd_lab.py

Frequently Asked Questions

  1. What is CVE-2026-115924? CVE-2026-115924 is a high-severity path traversal vulnerability in rembg (pip), affecting versions < 2.0.82. It is fixed in 2.0.82. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. How severe is CVE-2026-115924? CVE-2026-115924 has a CVSS score of 8.6 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of rembg are affected by CVE-2026-115924? rembg (pip) versions < 2.0.82 is affected.
  4. Is there a fix for CVE-2026-115924? Yes. CVE-2026-115924 is fixed in 2.0.82. Upgrade to this version or later.
  5. Is CVE-2026-115924 exploitable, and should I be worried? Whether CVE-2026-115924 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-115924 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-115924? Upgrade rembg to 2.0.82 or later.

Other vulnerabilities in rembg

Stop the waste.
Protect your environment with Kodem.