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·21 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

•21 minutes ago•CVE-2026-62297
7.5

CVE-2026-62297: Uncontrolled Memory Allocation and Denial of Service in ag-psd

An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.

Amit Schendel
Amit Schendel
1 views•10 min read
•about 1 hour ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
2 views•12 min read
•about 2 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
5 views•12 min read
•about 3 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
4 views•10 min read
•about 4 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 5 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read