CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-C2M8-H5V5-343R

GHSA-C2M8-H5V5-343R: Path Traversal via Improper Link Resolution in Tornado StaticFileHandler

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 1, 2026·4 min read·5 visits

Executive Summary (TL;DR)

Tornado's StaticFileHandler prior to 6.5.9 is vulnerable to path traversal and arbitrary file disclosure. By performing lexical validation instead of physical path resolution, the application serves files targeted by symbolic links that point outside the static root.

A path traversal and arbitrary file disclosure vulnerability exists in Tornado's StaticFileHandler. In versions prior to 6.5.9, the handler follows symbolic links that point outside of the configured root static directory. This behavior occurs because the handler performs lexical path validation rather than physical filesystem resolution, allowing unauthenticated remote attackers to read arbitrary files if they can access or control symbolic links within the served static root.

Vulnerability Overview

The affected component is tornado.web.StaticFileHandler, which serves static files from a configured root directory in web applications. It exposes an attack surface by receiving client-controlled path inputs and resolving them against the local filesystem.

The vulnerability is classified as CWE-59 (Improper Link Resolution Before File Access) and CWE-22 (Path Traversal). In vulnerable configurations, if an attacker can access or create a symbolic link inside the configured static root directory, they can traverse boundaries. This allows unauthorized retrieval of arbitrary files from the server's local filesystem.

Root Cause Analysis

The core of the vulnerability lies in the use of lexical resolution instead of physical resolution during path validation. The affected handler validated the absolute path using os.path.abspath, which performs pure string manipulation. Lexical resolution does not query the filesystem to determine whether path elements are symbolic links.

Because os.path.abspath validated that the path was lexically inside the configured root directory, the boundary check succeeded. However, when the file was subsequently opened, the operating system's filesystem resolved the physical symbolic link. This redirection allowed access to files located entirely outside the designated static root directory.

Furthermore, deferring physical resolution created a potential "existence oracle" vulnerability. If physical path resolution occurs after checking if a directory exists, requesting an out-of-bounds directory could cause a redirect (HTTP 301). Requesting a non-existent directory would return a standard error (HTTP 403 or 404), revealing the host layout to the attacker.

Code-Level Patch Analysis

The fix in version 6.5.9 addresses the bug by introducing an explicit physical resolution step during validation. The StaticFileHandler was updated with a new initializer argument named allowed_symlink_directory. This argument defaults to the configured base path but can be expanded manually.

The validation workflow first runs the lexical check, which remains a low-overhead defense against standard relative path traversal attempts. Following this, the method calls _resolve_symlink_target to obtain the physical canonical path using os.path.realpath. This canonical path is verified to ensure it begins with the allowed symlink directory path.

Additionally, the patch replaces multiple filesystem checks with a single-pass os.stat call. This optimization binds the validated path details to a static local state. By preventing multiple lookups during header generation, the code mitigates potential Time of Check to Time of Use (TOCTOU) race conditions.

Exploitation Methodology

Exploitation of this vulnerability requires that a symbolic link pointing outside the static root directory exists inside the static folder. This condition typically occurs in shared multi-tenant filesystems, repositories containing checked-in symlinks, or applications allowing custom file uploads.

An attacker executes the payload by requesting the symlink or a subpath of the symlinked directory over HTTP. The StaticFileHandler receives the path segment and matches it against its routing table. Because the requested URI does not contain direct lexical traversal characters like .., the initial validation steps are bypassed.

When the request finishes processing, the physical file is read and returned to the client. This exposes sensitive system files such as database configurations, application source code, or system credentials.

Remediation and Defensive Mitigations

The primary remediation strategy is upgrading the tornado package to version 6.5.9 or higher. This upgrade implements physical symlink target validation by default. If symlinks are required, administrators must configure allowed_symlink_directory explicitly to safe boundaries.

Operational workarounds include structuring filesystems to disallow symbolic links in directories handled by the static handler. Security teams should also filter user-uploaded archives to block the extraction of symbolic links. Running the application inside an isolated read-only container also restricts filesystem access.

Fix Analysis (2)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected Systems

Tornado web framework StaticFileHandler deployments

Affected Versions Detail

Product
Affected Versions
Fixed Version
Tornado
Tornadoweb
< 6.5.96.5.9
AttributeDetail
CWE IDCWE-59, CWE-22
Attack VectorNetwork
CVSS Score7.5 (High)
ImpactArbitrary File Disclosure
Exploit StatusPoC / Functional (via unit tests)
KEV StatusNot listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1083File and Directory Discovery
Discovery
CWE-59
Improper Link Resolution Before File Access ('Link Following')

The application attempts to access a file based on a filename, but it does not properly validate whether that file is a symbolic link or shortcut that redirects the access to an unintended resource.

References & Sources

  • [1]GitHub Advisory Entry GHSA-C2M8-H5V5-343R
  • [2]Tornado Pull Request #3719
  • [3]Tornado v6.5.9 Release Tag

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•43 minutes ago•CVE-2026-93981
4.7

CVE-2026-93981: Cross-Site Scripting via Unescaped SSR Pathways in Hono JSX Engine

An improper neutralization of input during web page generation (CWE-79) vulnerability exists in the server-side rendering JSX engine (hono/jsx) of the Hono web framework prior to version 4.13.7. The flaw enables unauthenticated remote attackers to execute arbitrary JavaScript in the victim's browser context by supplying unescaped HTML characters into user-controlled fields rendered within specific boundary components, context providers, or direct server-side utilities.

Alon Barad
Alon Barad
3 views•6 min read
•about 2 hours ago•GHSA-59CR-6R3X-644W
8.8

GHSA-59CR-6R3X-644W: GitPython Submodule Update Path Traversal Can Write Outside the Repository

A path traversal vulnerability exists in GitPython when handling submodule updates recursively. If an attacker crafts a malicious repository with traversed paths or symbolic links in the submodule configuration, they can execute arbitrary file writes outside the parent repository's working directory. This can lead to system configuration modifications or arbitrary code execution.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 4 hours ago•GHSA-CHX6-46F5-W4VP
7.5

GHSA-CHX6-46F5-W4VP: Uncontrolled Resource Consumption in Tornado CurlAsyncHTTPClient

A critical uncontrolled resource consumption vulnerability exists in the Tornado web server's libcurl-based HTTP client (CurlAsyncHTTPClient). When processing highly compressed responses with response decompression enabled, the client experiences unbounded memory growth. This leads to host memory exhaustion and denial of service via application crashes.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 5 hours ago•GHSA-3HV7-MJH2-FV65
5.3

GHSA-3HV7-MJH2-FV65: Unbounded Query-String Parsing Denial of Service in Tornado Web Server

An uncontrolled resource consumption vulnerability in Tornado's HTTP query-string parser allows remote, unauthenticated attackers to trigger CPU exhaustion and block the single-threaded event loop via crafted request URIs containing large numbers of parameters.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 6 hours ago•CVE-2026-103001
6.5

CVE-2026-103001: State Pollution in PyJWT Option Merging Leads to Claim Verification Bypass

PyJWT versions 2.11.0 through 2.13.0 suffer from a state pollution vulnerability in the `_merge_options` method. When an application passes a mutable configuration mapping with signature verification disabled, the library modifies the object in-place. If this same dictionary is reused for subsequent verified decode operations, standard claim verifications (such as expiration, audience, and issuer validation) are silently bypassed.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 7 hours ago•CVE-2026-92081
5.9

CVE-2026-92081: Denial of Service via Uncaught Exception on HTTP/2 Response Trailers in Fastify

A protocol validation vulnerability exists in Fastify before version 5.12.5. When serving requests over HTTP/2, Fastify unconditionally injects the forbidden Transfer-Encoding header when response trailers are used, triggering an uncaught exception in Node.js and crashing the process.

Alon Barad
Alon Barad
4 views•7 min read