CVE-2026-37737: Sanic cors Sanic-cors Contains An Improper Regular Vulnerability

MODERATE
Advisory Identifier: GHSA-94jw-hqvj-vw74
CVSS 6.5
CWE-346
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-37737
GHSA Identifier GHSA-94jw-hqvj-vw74
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-346: Origin Validation Error
Affected Product Sanic cors
Package Ecosystem PyPI
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

sanic-cors fixed: Latest secure release
pip install sanic-cors>=Latest secure release
Verify Direct and Transitive Dependencies

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

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.

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?
CVE-2026-37737 is a security vulnerability in Sanic cors involving sanic-cors contains an improper regular expression in the try_match() function under CWE-346: Origin Validation Error.
Which Sanic cors versions are affected?
Affected versions include releases prior to current release patches across affected packages: sanic-cors.
What version fixes CVE-2026-37737?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is sanic-cors affected?
Yes, sanic-cors is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-37737?
CVE-2026-37737 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-37737?
CVE-2026-37737 is classified under CWE-346: Origin Validation Error (The product does not properly verify that the source of data or communication is valid.).
How can I check PyPI dependencies for CVE-2026-37737?
Run the dependency tree command: 'pip show sanic-cors'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}