# CVE-2025-25302: Rembg CORS misconfiguration

Source: https://junglewise.ai/threats/cve-2025-25302-rembg-cors-misconfiguration  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-03-03  
License: CC BY 4.0 with a link back

CVE-2025-25302 · Severity: medium · CVSS 4 · Published 2025-03-03

Rembg is a tool to remove images background. In Rembg 2.0.57 and earlier, the CORS middleware is setup incorrectly. All origins are reflected, which allows any website to send cross site requests to the rembg server and thus query any API. Even if authentication were to be enabled, allow_credentials is set to True, which would allow any website to send authenticated cross site requests.

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

## Quick answers

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

**How severe is CVE-2025-25302?** Medium severity, with a CVSS score of 4, 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-25302?** 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-25302?** 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-25302
- GHSA-59qh-fmm7-3g9q
- PYSEC-2025-25

## 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 allows SSRF via /api/remove](https://junglewise.ai/threats/cve-2025-25301-rembg-allows-ssrf-via-api-remove)
