CVE-2026-37737

CORS Allowlist Bypass via Improper Regex in Sanic-Cors 2.2.0

Published Jun 5, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-94jw-hqvj-vw74 sanic-cors contains an improper regular expression in the try_match() function
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Ashleysommer
Ashleysommer sanic-cors
Vendors & Products Ashleysommer
Ashleysommer sanic-cors
Type Values Removed Values Added
Title CORS Allowlist Bypass via Improper Regex in Sanic-Cors 2.2.0
Type Values Removed Values Added
Title CORS Allowlist Bypass in Sanic‑Cors due to Improper Regex
Weaknesses CWE-285
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'}

Type Values Removed Values Added
Title CORS Allowlist Bypass in Sanic‑Cors due to Improper Regex
Weaknesses CWE-285
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
Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Jun 5, 2026, 8:15 PM
Reserved
Apr 6, 2026, 12:00 AM
Status
Deferred
Published
Jun 5, 2026, 3:16 PM
Modified
Jun 17, 2026, 10:41 AM