CVE-2025-25302: Rembg CORS misconfiguration

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). 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.