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

Fri, 05 Jun 2026 21:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-346
CWE-625
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}


Fri, 05 Jun 2026 15:45:00 +0000

Type Values Removed Values Added
Title CORS Allowlist Bypass in Sanic‑Cors due to Improper Regex
Weaknesses CWE-285

Fri, 05 Jun 2026 14:45:00 +0000

Type Values Removed Values Added
Description 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.
References

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-06-05T20:15:39.697Z

Reserved: 2026-04-06T00:00:00.000Z

Link: CVE-2026-37737

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-06-05T15:16:51.720

Modified: 2026-06-05T21:16:30.367

Link: CVE-2026-37737

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-05T15:30:13Z