CVE-2026-49854
Medium · 5.3CVSS
5.3
EPSS
0.4%
Published
Jul 14, 2026
CISA due date
—
Cloudanix analysis
A bug in a popular Python web library could let remote attackers read a few bytes of the server's memory, potentially exposing small pieces of data.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds read of up to three bytes in the native websocket_mask implementation when the mask argument is shorter than four bytes, triggered via XSRF token decoding with the tornado.speedups extension enabled.
Why it matters to the business
Attackers may obtain small fragments of process memory that could contain sensitive application data, increasing risk of information disclosure in high-volume or exposed Tornado deployments.
How an attack unfolds
An attacker sends a crafted request that causes Tornado to decode an XSRF token while the native speedups extension is active; the websocket_mask C function then reads beyond the supplied mask buffer, leaking adjacent memory bytes.
How to fix it
Upgrade Tornado to version 6.5.6 or later; if immediate upgrade is not possible, disable the native speedups extension by ensuring the pure-Python implementation is used.
How to confirm the fix worked
Confirm Tornado version is 6.5.6 or newer; test that websocket_mask calls enforce a four-byte mask and that XSRF token handling no longer triggers the native extension on malformed input.
Typical attack path
- Identify a Tornado application using the optional native speedups extension
- Craft a request that invokes XSRF token decoding logic
- Supply a mask shorter than four bytes to trigger the native websocket_mask path
- Read the leaked memory bytes returned in the response or side channel
How to detect it
Review application logs for unusual XSRF token processing errors or crashes around websocket handling; correlate with native extension loading indicators in startup logs; no widespread exploitation artifacts are known.
What your security team should do
- Prioritize upgrade to Tornado 6.5.6 across all deployments within standard change windows
- Audit environments for explicit use of tornado.speedups and remove or isolate such configurations
- Add Tornado version checks to dependency scanning and SBOM processes
The record
Tornado is a Python web framework and asynchronous networking library. Prior to 6.5.6, the optional native extension tornado.speedups implemented websocket_mask without validating that the mask argument is exactly four bytes, allowing the C function to read up to three bytes beyond the provided buffer when reached through Tornado XSRF token decoding with the native extension active. This issue is fixed in version 6.5.6.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| openSUSE:Leap 16.0 | python-tornado6 | 0 | 6.5-160000.5.1 |
| openSUSE:Tumbleweed | python-tornado6 | 0 | 6.5.7-1.1 |
Related vulnerabilities
- CVE-2026-49853 Tornado is a Python web framework and asynchronous networking library. Also affects python-tornado6
- CVE-2026-49855 Tornado is a Python web framework and asynchronous networking library. Also affects python-tornado6
- CVE-2026-31958 Tornado is a Python web framework and asynchronous networking library. Also affects python-tornado6
- CVE-2025-67726 Tornado is Vulnerable to Quadratic DoS via Crafted Multipart Parameters Also affects python-tornado6
- CVE-2025-67725 Tornado is Vulnerable to Quadratic DoS via Repeated Header Coalescing Also affects python-tornado6
- CVE-2025-67724 Tornado vulnerable to Header Injection and XSS via reason argument Also affects python-tornado6
- CVE-2025-47287 Tornado vulnerable to excessive logging caused by malformed multipart form data Also affects python-tornado6
- CVE-2024-52804 Tornado has an HTTP cookie parsing DoS vulnerability Also affects python-tornado6