CVE-2025-25302
JSON

8.7high

Rembg CORS misconfiguration

Severity
8.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-59qh-fmm7-3g9qPYSEC-2025-25

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.

Affected

Product or packageVersionsReported by
danielgatis rembg<= 2.0.57, up to 2.0.57CVE List, NVD
rembg (PyPI)up to 2.0.57, before 2.0.58GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS: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
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
PyPA Advisory Database6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Classification

CWE-346

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Rembg es una herramienta para eliminar el fondo de las imágenes. En Rembg 2.0.57 y versiones anteriores, el middleware CORS está configurado incorrectamente. Se reflejan todos los orígenes, lo que permite que cualquier sitio web envíe solicitudes entre sitios al servidor rembg y, por lo tanto, consulte cualquier API. Incluso si se habilitara la autenticación, allow_credentials se establece en True, lo que permitiría que cualquier sitio web envíe solicitudes autenticadas entre sitios.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-25302 changed 2025-03-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-59qh-fmm7-3g9q changed 2025-04-09CC-BY-4.0
NVDCVE-2025-25302 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2025-25 changed 2026-06-10CC-BY-4.0