Skip to content
Heist/ feed
Back to feed
High

Rembg CORS misconfiguration

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-25302
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 20:58 UTC · Revision 1

Source evidence

Rembg CORS misconfiguration

core-osv · Original source

Published 3 Mar 2025, 16:40 UTC

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.

osv:CVE-2025-25302
Complete source record
{
  "id": "6ccaf0b68ec5be7dc6d97dfb9f19fa7153a9250f5bbd29851208cfc2834df488",
  "url": "https://osv.dev/vulnerability/CVE-2025-25302",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Rembg CORS misconfiguration",
    "summary": "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.",
    "evidence": "osv:CVE-2025-25302",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-25302",
      "aliases": [
        "CVE-2025-25302",
        "GHSA-59qh-fmm7-3g9q",
        "PYSEC-2025-25"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/danielgatis/rembg",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "d1e00734f8a996abf512a3a5c251c7a9a392c90a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.0.57"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:danielgatis:rembg:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.0.57"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.0.57",
            "v2.0.56",
            "v2.0.55",
            "v2.0.54",
            "v2.0.53",
            "v2.0.52",
            "v2.0.51",
            "v2.0.50",
            "v2.0.49",
            "v2.0.48",
            "v2.0.47",
            "v2.0.46",
            "v2.0.45",
            "v2.0.44",
            "v2.0.43",
            "v2.0.42",
            "v2.0.41",
            "v2.0.40",
            "v2.0.39",
            "v2.0.38",
            "v2.0.37",
            "v2.0.36",
            "v2.0.35",
            "v2.0.34",
            "v2.0.33",
            "v2.0.32",
            "v2.0.31",
            "v2.0.30",
            "v2.0.29",
            "v2.0.28",
            "v2.0.27",
            "v2.0.26",
            "v2.0.25",
            "v2.0.24",
            "v2.0.23",
            "v2.0.22",
            "v2.0.21",
            "v2.0.20",
            "v2.0.19",
            "v2.0.18",
            "v2.0.17",
            "v2.0.16",
            "v2.0.15",
            "v2.0.14",
            "v2.0.13",
            "v2.0.12",
            "v2.0.11",
            "v2.0.10",
            "v2.0.9",
            "v2.0.8",
            "v2.0.7",
            "v2.0.6",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.0.31",
            "v0.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-25302.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:23.761415587Z",
      "provider": "osv",
      "references": [
        "https://github.com/danielgatis/rembg/blob/d1e00734f8a996abf512a3a5c251c7a9a392c90a/rembg/commands/s_command.py#L93",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25302.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-25302",
        "https://securitylab.github.com/advisories/GHSL-2024-161_GHSL-2024-162_rembg/"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-346"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25302.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-25302",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490032,
  "published_at": "2025-03-03T16:40:34.811+00:00"
}