Server crash if running Python 3.10 w/ Sanic 20.12
Summary
GHSA-7p79-6x2v-5h88: Server crash if running Python 3.10 w/ Sanic 20.12. Affects sanic versions >= 0.1.7, < 20.12.6. Fixed in 20.12.6. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Sanic is a Python web framework that allows developers to build fast and efficient web applications. It is known for its asynchronous capabilities, making it suitable for high-performance applications. However, versions of Sanic prior to 20.12 are not compatible with Python 3.10. This vulnerability specifically affects servers running Sanic with Python 3.10, causing them to crash when receiving web requests.
Vulnerability Detail
The vulnerability arises from the incompatibility between Sanic versions prior to 20.12 and Python 3.10. While Sanic officially supports Python versions 3.6 to 3.9, running it with Python 3.10 leads to server crashes upon receiving web requests. This issue stems from the deprecation and removal of explicit loop argument passing in asyncio, which affects Sanic's functionality. The impact of this vulnerability is limited to users running Sanic server versions between 0.1.7 and 20.12 with Python 3.10.
How To Fix
Latest published version: 25.12.1 as of 22 Oct 2026
pip install --upgrade "sanic==25.12.1"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
20.12.6
This is the first release that contains the fix.
pip install --upgrade "sanic==20.12.6"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to the latest Sanic version is not immediately feasible, a workaround is to use a supported version of Python (v3.6 - v3.9) instead of Python 3.10. By using a compatible Python version, the server crash issue can be avoided.
Conclusion
In conclusion, the vulnerability in Sanic versions prior to 20.12 when used with Python 3.10 can lead to server crashes. To mitigate this issue, it is recommended to upgrade to Sanic version 20.12.6 or later. Alternatively, using a supported version of Python (v3.6 - v3.9) can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for sanic →
FAQ
Sanic versions between 0.1.7 and 20.12 are affected by this vulnerability when used with Python 3.10.
Running Sanic with Python 3.10 will result in server crashes when receiving web requests.
Yes, Sanic version 20.12.6 includes the necessary fixes to address this vulnerability.
Yes, if upgrading to the latest Sanic version is not possible, you can use a supported version of Python (v3.6 - v3.9) to avoid the server crash issue.
For more information, you can visit the Sanic community forums or the Discord server.
References
Related vulnerabilities
Recent vulnerabilities recorded for sanic.