# CVE-2025-25302: Rembg CORS misconfiguration

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-03T16:40:34.811Z
- Modified: 2026-06-17T09:00:38.900Z
- Also known as: GHSA-59qh-fmm7-3g9q, PYSEC-2025-25
- Weaknesses: CWE-346
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- danielgatis rembg: <= 2.0.57; up to 2.0.57
- rembg (PyPI): up to 2.0.57; before 2.0.58

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 High `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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://securitylab.github.com/advisories/GHSL-2024-161_GHSL-2024-162_rembg/> (exploit, advisory, evidence, third-party-advisory)
- <https://github.com/danielgatis/rembg/blob/d1e00734f8a996abf512a3a5c251c7a9a392c90a/rembg/commands/s_command.py#L93> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-25302> (advisory)
- <https://github.com/danielgatis/rembg> (package)
- <https://securitylab.github.com/advisories/GHSL-2024-161_GHSL-2024-162_rembg> (advisory)
- <https://github.com/advisories/GHSA-59qh-fmm7-3g9q> (advisory)

## Sources

- CVE List: [CVE-2025-25302](https://www.cve.org/CVERecord?id=CVE-2025-25302), CVE Terms of Use, modified 2025-03-03
- GitHub Advisory Database: [GHSA-59qh-fmm7-3g9q](https://github.com/advisories/GHSA-59qh-fmm7-3g9q), CC-BY-4.0, modified 2025-04-09
- NVD: [CVE-2025-25302](https://nvd.nist.gov/vuln/detail/CVE-2025-25302), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2025-25](https://osv.dev/vulnerability/PYSEC-2025-25), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2025-25302 · Whole record: https://cve.day/CVE-2025-25302.json · Rebuilt by cve.day 2026-11-25T22:58:54.921Z
