CVE-2026-49854: Tornado Tornado Has Out-of-bounds Memory Access Vulnerability
LOWCVE-2026-49854 is a LOW (CVSS 3.7) tornado has out-of-bounds memory access vulnerability (CWE-126: Buffer Over-read) affecting Tornado libraries in the PyPI ecosystem. The issue involves tornado has out-of-bounds memory access via c extension. Remediation is available by upgrading affected packages to version 6.5.6.
CVE-2026-49854 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-49854
To remediate this vulnerability, upgrade all affected Tornado dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install tornado>=6.5.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show tornado
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-49854, inspect your installed packages using pip:
pip show tornado
Analyze the terminal output to locate any version of Tornado in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.5.6), your application is affected.
Note: The pip show tornado command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-126: Buffer Over-read, where the product reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations after the targeted buffer. In Tornado, 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
CVE-2026-49854 Affected Tornado Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tornado
|
PyPI |
< 6.5.6
|
6.5.6
|
References
Frequently Asked Questions
What is CVE-2026-49854?
Which Tornado versions are affected?
What version fixes CVE-2026-49854?
Is tornado affected?
What is the CVSS score of CVE-2026-49854?
What CWE is associated with CVE-2026-49854?
How can I check PyPI dependencies for CVE-2026-49854?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cx3h-4qpv-8hc9",
"modified" : "2026-06-12T18:30:19Z",
"published" : "2026-06-12T18:30:19Z",
"aliases" : [ "CVE-2026-49854" ],
"summary" : "Tornado has out-of-bounds memory access via C extension",
"details" : "### Summary\n\nTornado'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.\n\nThe behavior is reachable from Tornado's XSRF token decoder when `xsrf_cookies=True` and the native extension is active. \n\n### Mitigations\n\nThis bug is fixed in Tornado 6.5.6. Prior to upgrading to this version, setting the environment variable TORNADO_EXTENSION=0 will disable the vulnerable code (at the expense of reducing websocket performance).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "tornado"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.5.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tornadoweb/tornado/security/advisories/GHSA-cx3h-4qpv-8hc9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tornadoweb/tornado"
}, {
"type" : "WEB",
"url" : "https://github.com/tornadoweb/tornado/releases/tag/v6.5.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-126" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-12T18:30:19Z",
"nvd_published_at" : null
}
}