CVE-2026-37737: Sanic cors Sanic-cors Contains An Improper Regular Vulnerability
MODERATECVE-2026-37737 is a MODERATE (CVSS 6.5) sanic-cors contains an improper regular vulnerability (CWE-346: Origin Validation Error) affecting Sanic cors libraries in the PyPI ecosystem. The issue involves sanic-cors contains an improper regular expression in the try_match() function. Remediation is available in the latest vendor maintenance releases.
CVE-2026-37737 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-37737
To remediate this vulnerability, upgrade all affected Sanic cors dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install sanic-cors>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show sanic-cors
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-37737, inspect your installed packages using pip:
pip show sanic-cors
Analyze the terminal output to locate any version of Sanic cors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show sanic-cors command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. In Sanic cors, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-37737 Affected Sanic cors Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sanic-cors
|
PyPI |
≤ 2.2.0
|
|
References
Frequently Asked Questions
What is CVE-2026-37737?
Which Sanic cors versions are affected?
What version fixes CVE-2026-37737?
Is sanic-cors affected?
What is the CVSS score of CVE-2026-37737?
What CWE is associated with CVE-2026-37737?
How can I check PyPI dependencies for CVE-2026-37737?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-94jw-hqvj-vw74",
"modified" : "2026-07-17T17:05:30Z",
"published" : "2026-06-05T15:32:25Z",
"aliases" : [ "CVE-2026-37737" ],
"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" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "sanic-cors"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-37737"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ashleysommer/sanic-cors"
}, {
"type" : "WEB",
"url" : "https://github.com/ashleysommer/sanic-cors/blob/master/sanic_cors/core.py"
}, {
"type" : "WEB",
"url" : "https://github.com/npbhatter17/security-advisories/blob/main/CVE-2026-37737-sanic-cors-advisory.md"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/Sanic-Cors"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-346" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-17T17:05:30Z",
"nvd_published_at" : "2026-06-05T15:16:51Z"
}
}