sanic-cors contains an improper regular expression in the try_match() function
Moderate severity
GitHub Reviewed
Published
Jun 5, 2026
to the GitHub Advisory Database
•
Updated Jul 17, 2026
Description
Published by the National Vulnerability Database
Jun 5, 2026
Published to the GitHub Advisory Database
Jun 5, 2026
Reviewed
Jul 17, 2026
Last updated
Jul 17, 2026
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