Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Network-exploitable with no authentication or user interaction required; impact is confidentiality-only as traversal enables file read but not write or denial of service.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
Lifecycle Timeline
2DescriptionCVE.org
A path traversal vulnerability in o1lab/xmysql (all versions) allows an unauthenticated remote attacker to read and download arbitrary files from the server. The lib/xapi.js file at lines 338 and 424 uses the user-controlled req.query.name parameter in path.join(cwd, name) without sanitization before passing it to res.download(), enabling directory traversal via ../ sequences to access sensitive system files.
AnalysisAI
Path traversal in o1lab/xmysql (all versions) allows unauthenticated remote attackers to read and download arbitrary files from the host server via a crafted query parameter. The flaw exists in lib/xapi.js at lines 338 and 424, where the unsanitized req.query.name value is joined with the working directory and passed directly to res.download(), enabling ../ sequences to escape the application root. No patch has been released and all versions are confirmed affected, making every exposed instance immediately actionable for attackers with network access.
Technical ContextAI
xmysql is a Node.js application that auto-generates a REST API layer over a MySQL database, commonly used for rapid prototyping. The vulnerability resides in lib/xapi.js, where the Express route handler accepts a user-supplied name query parameter and constructs a file path using Node.js's path.join(cwd, name). Critically, path.join resolves ../ segments - it does not strip or reject them - meaning a value like ../../../../etc/passwd yields a fully resolved path outside the application directory. The resulting path is then passed to Express's res.download(), which reads and streams the file to the HTTP client without any subsequent validation. CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) precisely describes this root cause: the application fails to canonicalize or validate the path before file I/O. The affected CPE is cpe:2.3:a:o1lab:xmysql:*:*:*:*:*:*:*:*, confirming all published versions are affected.
RemediationAI
No vendor-released patch has been identified at time of analysis; the provided references point only to the upstream repository and source file with no advisory or tagged fix release. Until a patch is available, operators should immediately restrict network access to xmysql instances using firewall rules or network segmentation so the service is not reachable from untrusted networks - this is the most effective compensating control given the zero-authentication attack vector. As an additional layer, place xmysql behind an authenticated reverse proxy (e.g., nginx with HTTP basic auth or mutual TLS) to require credentials before any request reaches the application; note this adds operational overhead and does not fix the underlying flaw. Operators should also ensure the xmysql process runs as a least-privilege OS user with read access limited to the intended data directory, reducing the blast radius of a successful traversal. Monitor the GitHub repository at https://github.com/o1lab/xmysql for patch releases and apply immediately upon availability.
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-55234
GHSA-9pgj-cxw3-gw33