Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-113738 Overview
CVE-2026-113738 is a path traversal vulnerability [CWE-22] in the R6410418 Jackrong-llm-finetuning-guide project. The flaw resides in the extract_mtp_heads function of qwen-mtp-gguf/scripts/qwen_mtp_gguf_pipeline.py, within the MTP weight_map Handler component. Manipulation of the shard_name argument allows an attacker to traverse directories outside the intended path. The project uses a rolling release model, so no fixed version identifier is available. The maintainer was notified through an issue report but has not responded. A proof-of-concept is publicly available.
Critical Impact
Remote attackers can abuse shard_name to read or write files outside the intended directory, affecting confidentiality, integrity, and availability of files accessible to the processing user.
Affected Products
- R6410418 Jackrong-llm-finetuning-guide (rolling release)
- Commit ef2b17f2798cd18cd85375080c35a58397ad0d09 and prior
- Component: qwen-mtp-gguf/scripts/qwen_mtp_gguf_pipeline.py MTP weight_map Handler
Discovery Timeline
- 2026-10-21 - CVE-2026-113738 published to the National Vulnerability Database
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-113738
Vulnerability Analysis
The vulnerability affects the extract_mtp_heads function used to process Multi-Token Prediction (MTP) weight shards for Qwen GGUF model conversion. The function consumes a shard_name value from the weight_map structure and uses it to construct a filesystem path without validating that the resulting path remains within the intended working directory. An attacker who controls the weight_map input, for example by supplying a crafted model index file, can inject path components such as ../ or absolute paths to reference arbitrary files on the host.
Exploitation requires user interaction, as the attack succeeds when a victim processes an attacker-supplied model artifact through the pipeline. Because machine learning model files are commonly shared through public hubs and repositories, the path to user-controlled input is realistic. Public disclosure of the issue and a proof-of-concept archive increase the likelihood of opportunistic use.
Root Cause
The root cause is missing sanitization of the shard_name argument before it is joined with a base directory and passed to file operations. The handler trusts values originating from the weight_map without canonicalizing the result or verifying containment within an allow-listed directory.
Attack Vector
The attack vector is network-reachable in the sense that malicious model artifacts can be delivered over the network, but exploitation triggers when a user runs the conversion pipeline against the attacker-controlled input. The result is arbitrary file read or write within the privileges of the process running the script. Refer to the VulDB entry for CVE-2026-113738 and the upstream issue tracker for additional technical context.
Detection Methods for CVE-2026-113738
Indicators of Compromise
- Unexpected file reads or writes outside the model working directory initiated by the Python interpreter running qwen_mtp_gguf_pipeline.py.
- Presence of ../, absolute paths, or encoded traversal sequences inside weight_map entries of downloaded model index files.
- Model repositories or archives containing index.json files whose shard_name values do not match the file layout of the archive.
Detection Strategies
- Statically scan model index files for shard_name values containing path separators, parent directory references, or absolute paths before invoking the pipeline.
- Monitor process telemetry for the conversion script accessing paths outside the designated model workspace, such as user home directories, SSH key stores, or system configuration files.
- Audit source control for unreviewed uses of os.path.join with externally supplied filename components in model tooling.
Monitoring Recommendations
- Log and alert on file operations performed by ML tooling that cross workspace boundaries.
- Capture command-line invocations and input artifact hashes to allow retroactive investigation when a new malicious model is identified.
- Correlate downloads of model shards from untrusted sources with subsequent pipeline execution events.
How to Mitigate CVE-2026-113738
Immediate Actions Required
- Avoid running qwen_mtp_gguf_pipeline.py against model artifacts obtained from untrusted or unverified publishers.
- Review and sanitize any weight_map entries before processing, rejecting any shard_name containing path separators or traversal sequences.
- Execute the pipeline in an isolated environment such as a container or dedicated user account with no access to sensitive files.
Patch Information
No official patch is available. The project uses a rolling release model, and the maintainer has not responded to the upstream GitHub issue #16 at the time of publication. Users should track the project repository for updates and apply local fixes until an upstream remediation is published.
Workarounds
- Patch extract_mtp_heads locally to validate that the resolved path remains inside the intended base directory using os.path.realpath containment checks.
- Reject shard_name values that are not plain filenames by matching against a strict allow-list pattern such as ^[A-Za-z0-9_.-]+$.
- Run the pipeline under a least-privileged service account with filesystem access limited to the model workspace.
- Use mandatory access controls, filesystem namespaces, or read-only bind mounts to constrain the blast radius of a traversal attempt.
# Example containment check to add before opening a shard file
python - <<'EOF'
import os, sys
base = os.path.realpath('/opt/models/workspace')
candidate = os.path.realpath(os.path.join(base, sys.argv[1]))
if not candidate.startswith(base + os.sep):
raise SystemExit('refusing path traversal in shard_name')
EOF
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

