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



CVE-2026-39847

CVE-2026-39847: Critical Path Traversal in Emmett RSGI Static Handler

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 8, 2026·6 min read·49 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can read arbitrary local files via a path traversal flaw in Emmett's internal static asset handler (/__emmett__/). Upgrading to version 2.8.1 resolves the issue.

The Emmett Python web framework contains a critical path traversal vulnerability in its RSGI static asset handler. Versions 2.5.0 through 2.8.0 fail to sanitize file paths passed to the internal /__emmett__/ routing prefix, allowing unauthenticated remote attackers to read arbitrary files from the server filesystem.

Vulnerability Overview

CVE-2026-39847 is a critical path traversal vulnerability affecting the Emmett full-stack Python web framework. The vulnerability resides within the framework's internal static asset serving mechanism, specifically the RSGI handler designated for the /__emmett__/ URI prefix. This route serves bundled static assets such as CSS and JavaScript files utilized by the framework's internal error pages and diagnostic views.

The core issue stems from insufficient input sanitization when processing client-supplied filenames. The framework extracts the file path directly from the HTTP request URI and processes it without executing proper validation against directory traversal sequences. This improper handling constitutes a CWE-22 vulnerability, classified as Improper Limitation of a Pathname to a Restricted Directory.

Successful exploitation permits an unauthenticated remote attacker to escape the designated web root and access arbitrary files stored on the underlying server operating system. The attacker operates with the read permissions of the user account executing the web server process. The vulnerability presents a severe risk to data confidentiality and system integrity.

Root Cause Analysis

The vulnerability originates within the HTTPHandler class located in the emmett/rsgi/handlers.py source file. Specifically, the _static_handler method processes incoming requests mapped to the /__emmett__/ internal routing prefix. The application logic attempts to serve local files from a designated assets directory bundled with the framework package.

The application extracts the targeted filename using static string slicing operations on the incoming request path. The implementation truncates the initial 12 characters of the path, corresponding to the /__emmett__/ prefix, and assigns the remainder to a file_name variable. The code then directly concatenates this unsanitized file_name string with the absolute path of the package's internal assets directory utilizing the standard Python os.path.join method.

Python's os.path.join function performs simple string concatenation based on the operating system's directory separator format. The function does not intrinsically normalize path structures or resolve relative traversal sequences such as ../. Consequently, when an attacker provides a payload containing these sequences, the resulting string passed to the file read operation points outside the intended asset boundary, leading to direct filesystem exposure.

Code Analysis

Analysis of the vulnerable code in versions 2.5.0 through 2.8.0 illustrates the insecure usage of path construction functions. The _static_handler method extracts the filename and immediately constructs the target file path without canonicalization.

def _static_handler(self, scope, protocol, path: str) -> Awaitable[HTTPResponse]:
    # ... logic ...
    if path.startswith("/__emmett__/"):
        file_name = path[12:] # Extracts the filename after /__emmett__/
        if not file_name:
            return self._http_response(404)
        # VULNERABLE: Direct concatenation without normalization
        static_file = os.path.join(os.path.dirname(__file__), "..", "assets", file_name)
        if os.path.splitext(static_file)[1] == "html":
            return self._http_response(404)
        return self._static_response(static_file)

The remediation introduced in commit 1c0cc24b668606f956d2eeae04b2ed0271998828 (version 2.8.1) implements comprehensive path canonicalization and boundary enforcement. The maintainers utilized os.path.realpath to resolve symbolic links and eliminate relative traversal characters before attempting file access.

_pkg_assets_path = os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "assets"))
 
# Inside _static_handler:
static_file = os.path.realpath(os.path.join(_pkg_assets_path, file_name))
if not static_file.startswith(_pkg_assets_path):
    return self._http_response(404)

While the fix effectively mitigates the immediate path traversal vulnerability, security researchers identified a theoretical partial path match condition. The boundary validation relies on the string-based startswith() method (static_file.startswith(_pkg_assets_path)). If an attacker manages to provision a sibling directory sharing the exact string prefix of the canonical asset path (e.g., assets_backup), the boundary check yields a false positive. However, provisioning sibling directories within standard Python site-packages environments requires elevated local access, minimizing the practical risk of this nuance.

Exploitation Methodology

Exploitation of CVE-2026-39847 requires no authentication and executes over standard network protocols. The attacker targets the designated asset routing prefix exposed by the Emmett framework framework. Network access to the application port constitutes the sole prerequisite for initiating the attack.

The attacker formulates a malicious payload by appending directory traversal sequences directly adjacent to the /__emmett__/ routing prefix. The exact depth of the traversal sequence depends on the relative location of the target file relative to the framework's internal assets directory installation path. Threat actors execute these requests seamlessly utilizing standard utilities such as curl or automated vulnerability scanners.

A successful exploit generates an HTTP 200 OK status code accompanied by the raw contents of the targeted file. If the requested file does not exist, or if the server process lacks adequate read permissions at the operating system level, the application returns a standard HTTP 404 Not Found or HTTP 500 Internal Server Error respectively.

Impact Assessment

The primary impact of CVE-2026-39847 encompasses the unauthorized disclosure of sensitive information residing on the web server's local filesystem. An attacker acquires read access to any file that the application process possesses permissions to access. The exposure scope frequently includes application source code, configuration files, environment variable definitions, and localized database structures.

Exposure of application source code facilitates subsequent vulnerability discovery by providing attackers with complete visibility into the custom application logic. Furthermore, access to configuration files routinely reveals hardcoded credentials, API keys, and database connection strings. Threat actors leverage these compromised credentials to pivot internally, escalating privileges and compromising connected data stores or third-party services.

The Common Vulnerability Scoring System (CVSS) evaluates this flaw at 9.1 (Critical). The vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H indicates high impacts to both confidentiality and availability. The high availability impact metric indicates that reading specific operating system files, such as blocking devices or named pipes (/dev/zero, /dev/random), locks the application thread indefinitely, resulting in a persistent denial of service condition.

Remediation and Mitigation

The definitive remediation for CVE-2026-39847 involves upgrading the Emmett framework to version 2.8.1 or later. The framework maintainers integrated path canonicalization and strict boundary validation into this release. Administrators perform this upgrade utilizing the standard Python package installer (pip install --upgrade emmett), followed by a restart of the application server processes.

Organizations incapable of deploying the patched version immediately must implement compensating controls at the network perimeter. Administrators configure reverse proxies, such as Nginx or HAProxy, to intercept and discard HTTP requests destined for the /__emmett__/ path containing ../ or %2e%2e sequences. This control prevents the malicious payload from reaching the vulnerable application routing logic.

Web Application Firewalls (WAF) provide an supplementary layer of defense by applying generic path traversal signatures to all incoming HTTP traffic. Security teams configure active rulesets to monitor and block anomalous URI patterns traversing root or sensitive directory structures. Continuous monitoring of web access logs for HTTP 200 responses associated with the internal routing prefix assists operators in detecting active exploitation attempts within their environments.

Official Patches

emmett-frameworkOfficial code fix addressing path traversal.

Fix Analysis (1)

Technical Appendix

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

Affected Systems

Emmett Framework versions 2.5.0 through 2.8.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
Emmett
emmett-framework
>= 2.5.0, < 2.8.12.8.1
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork (Remote)
CVSS v3.1 Score9.1 (Critical)
ImpactHigh Confidentiality, High Availability
Exploit StatusProof of Concept Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Path Traversal

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Known Exploits & Detection

Security AdvisoriesProof of Concept outlined in the official vulnerability disclosure report.

Vulnerability Timeline

Initial framework patch committed (version 2.8.1).
2026-04-07
Security logic patch fixing the path traverse logic committed.
2026-04-07
CVE-2026-39847 published to CVE.org.
2026-04-07
Vulnerability analyzed and published to NVD.
2026-04-07

References & Sources

  • [1]GitHub Security Advisory: GHSA-pr46-2v3c-5356
  • [2]NVD Vulnerability Detail: CVE-2026-39847
  • [3]CVE.org Entry: CVE-2026-39847

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

•about 1 hour ago•CVE-2026-103918
6.5

CVE-2026-103918: Prototype Injection and Denial of Service in oRPC @orpc/zod Smart Coercion Engine

CVE-2026-103918 is a medium-severity vulnerability within the @orpc/zod smart coercion plugin in oRPC. Prior to version 1.14.10, the package fails to sanitize untrusted input keys when performing pre-validation type coercion, allowing prototype injection on the returned request object and Denial of Service.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 2 hours ago•GHSA-3CM4-CCVW-6XR6
7.5

GHSA-3cm4-ccvw-6xr6: Weak Path Access Control and History/Repo-Diff Endpoint Bypass in SiYuan

A weak path access control vulnerability in SiYuan note-taking application allowed authenticated users to bypass restricted file paths by requesting historical backups and git diffs of sensitive configurations, including plain-text authentication tokens.

Amit Schendel
Amit Schendel
8 views•6 min read
•about 3 hours ago•GHSA-4WWP-F6GW-6QM5
7.7

GHSA-4WWP-F6GW-6QM5: Sensitive Information Disclosure via Incomplete Path Blocklist in SiYuan

An incomplete path blocklist in the file retrieval engine of the SiYuan knowledge management platform allows authenticated users to read TLS and CA private key materials directly from the configuration directory.

Alon Barad
Alon Barad
7 views•6 min read
•about 11 hours ago•CVE-2026-88779
8.7

CVE-2026-88779: Improper Restriction of Operations within the Bounds of a Memory Buffer in Citrix NetScaler SAML Authentication Daemon

CVE-2026-88779 is a critical vulnerability in Citrix NetScaler ADC and Citrix NetScaler Gateway affecting systems configured as a SAML Service Provider (SP) or SAML Identity Provider (IdP). An unauthenticated remote attacker can exploit this vulnerability to trigger a buffer overflow in the authentication daemon, resulting in persistent denial of service and appliance crash loops.

Amit Schendel
Amit Schendel
29 views•6 min read
•2 days ago•GHSA-9Q4R-4842-93VW
7.7

GHSA-9Q4R-4842-93VW: Cross-Tenant SQL Injection in Trigger.dev TSQL Query Compiler

A critical cross-tenant SQL injection vulnerability exists in the TSQL query compiler of Trigger.dev, allowing authenticated users to bypass tenant isolation boundaries and read arbitrary ClickHouse analytics logs and execution payloads belonging to other organizations.

Alon Barad
Alon Barad
11 views•6 min read
•2 days ago•GHSA-4672-HWV6-GQ62
5.4

GHSA-4672-HWV6-GQ62: Cross-environment deployment cancellation in Trigger.dev

A logical authorization bypass vulnerability exists in Trigger.dev versions prior to 4.5.6. This flaw allows an authenticated client with a low-trust environment API key, such as development or staging, to cancel active worker deployments in a higher-trust environment like production within the same project. The vulnerability occurs because write operations on deployments were scoped solely by project identifier instead of environment identifier.

Alon Barad
Alon Barad
7 views•6 min read