# CVE-2025-25301: Rembg allows SSRF via /api/remove

Source: https://junglewise.ai/threats/cve-2025-25301-rembg-allows-ssrf-via-api-remove  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-03-03  
License: CC BY 4.0 with a link back

CVE-2025-25301 · Severity: low · CVSS 3.1 · Published 2025-03-03

Rembg is a tool to remove images background. In Rembg 2.0.57 and earlier, the /api/remove endpoint takes a URL query parameter that allows an image to be fetched, processed and returned. An attacker may be able to query this endpoint to view pictures hosted on the internal network of the rembg server. This issue may lead to Information Disclosure.

Technologies: [rembg (PyPI)](https://junglewise.ai/threats/technologies/pypi-rembg). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-25301 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-25301 being exploited in the wild.

**How severe is CVE-2025-25301?** Low severity, with a CVSS score of 3.1, published 3 March 2025.

**Which products and versions are affected?** rembg (PyPI) ECOSYSTEM:introduced=0,fixed=2.0.58, ECOSYSTEM:introduced=0,last_affected=2.0.57.

**Is there a fix for CVE-2025-25301?** Yes. rembg (PyPI): upgrade to 2.0.58 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2025-25301?** Check whether you run rembg (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- rembg (PyPI): upgrade to 2.0.58 or later

  ```sh
  pip install "rembg>=2.0.58"
  ```


## Affected products

- rembg (PyPI) ECOSYSTEM:introduced=0,fixed=2.0.58, ECOSYSTEM:introduced=0,last_affected=2.0.57

## Identifiers

- CVE-2025-25301
- GHSA-r5gx-c49x-h878
- PYSEC-2025-24

## Related threats

- [Rembg path traversal and file disclosure via sam_model parameter](https://junglewise.ai/threats/cve-2026-115924-rembg-is-a-tool-to-remove-images-background-prior-to-2-0-82-the)
- [danielgatis rembg path traversal in HTTP server custom model loading](https://junglewise.ai/threats/cve-2026-40086-danielgatis-rembg-path-traversal-in-http-server-custom-model)
- [Rembg CORS misconfiguration](https://junglewise.ai/threats/cve-2025-25302-rembg-cors-misconfiguration)
