CVE-2026-49854

Tornado: Out-of-bounds memory access in C extension

Published Jul 14, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Tornado is a Python web framework and asynchronous networking library. The vulnerability is an out‑of‑bounds memory read in the optional C extension tornado.speedups. The extension implements websocket_mask without validating that the mask argument is exactly four bytes, allowing the C function to read up to three bytes beyond the supplied buffer when XSRF token decoding is performed with the native extension active. Because the read is unbounded, it may expose adjacent memory contents, allowing an attacker to glean sensitive data. The flaw does not provide direct code execution, so the primary impact is information disclosure.

Affected Systems

Any installation of Tornado version 6.5.5 or earlier, including all releases of the Tornado Web framework that include the optional tornado.speedups C extension, is vulnerable. The issue is fixed in Tornado 6.5.6.

Risk and Exploitability

The CVSS score of 5.3 places this flaw in the Medium severity range. The EPSS score of less than 1% indicates that exploitation is unlikely. The vulnerability is not listed in the CISA KEV catalog. The out‑of‑bounds read can be triggered via client requests that invoke XSRF token decoding through the vulnerable C code, but the description does not specify an exact attack vector. Because the flaw only allows a limited memory read, an attacker would need additional context or information to convert it into a more serious attack.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Tornado 6.5.6 or later to receive the authoritative fix for the out‑of‑bounds read in tornado.speedups.
  • If an immediate upgrade is not possible, disable the optional native extension by turning off tornado.speedups in the Tornado configuration, thereby preventing the vulnerable C code from executing.
  • Limit exposure of any endpoints that trigger XSRF token decoding while the speedups extension remains disabled, ensuring that client connections can only use the necessary interfaces.

Generated by OpenCVE AI on July 31, 2026 at 04:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-cx3h-4qpv-8hc9 Tornado has out-of-bounds memory access via C extension
History
Type Values Removed Values Added
First Time appeared Tornadoweb
Tornadoweb tornado
Vendors & Products Tornadoweb
Tornadoweb tornado
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Tornado: Out-of-bounds memory access in C extension
Weaknesses CWE-126
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 1:26 PM
Reserved
Jun 1, 2026, 10:03 PM
Status
Deferred
Published
Jul 14, 2026, 9:17 PM
Modified
Oct 24, 2026, 9:10 PM
Severity
Moderate
Public date
Jul 14, 2026, 8:43 PM