Advisory

PYSEC-2026-3539

Also known as: CVE-2026-37737, GHSA-94jw-hqvj-vw74

Summary

sanic-cors contains an improper regular expression in the try_match() function

Details

sanic-cors version 2.2.0 and prior contains an improper regular expression in the try_match() function in sanic_cors/core.py that uses re.match without end-anchoring. This allows an attacker to bypass CORS origin allowlists by registering a domain that begins with a trusted origin string, to gain unauthorized access to cross-origin requests for authenticated resources.

Severity

Medium Basis: CVSS v3 score 6.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Dates

Published
2026-07-23 11:41 UTC
Modified
2026-07-23 15:00 UTC

Affected packages and fixes

sanic-cors

PyPI · All systems

Affected

  • introduced 0, last affected 2.2.0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences