CVE-2026-49854: Tornado has out-of-bounds memory access via C extension
Tornado’s optional native extension tornado.speedups implements websocket_mask without validating that the mask argument is exactly four bytes long. The C function reads four bytes from mask unconditionally, even when Python passes a shorter byte string. This can read beyond the provided buffer, exposing up to 3 bytes of uninitialized memory.
The behavior is reachable from Tornado’s XSRF token decoder when xsrf_cookies=True and the native extension is active.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-49854 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →