| Title | SakanaAI text-to-LoRA 0.0.1 (commit 8ba77493eb8c), vulnerable code unchanged on the main branch as of 2026-10-16 Path Traversal |
|---|
| Description | A vulnerability was found in SakanaAI text-to-LoRA 0.0.1 (commit 8ba77493eb8c) and classified as medium 4.6.
Affected is the get_tokenizer() function of the checkpoint-loading component in
src/hyper_llm_modulator/utils/model_loading.py. The manipulation of the argument
base_model_name_or_path in an untrusted checkpoint's adapter_config.json leads to path traversal.
It is possible to launch the attack remotely. User interaction is required because the victim must
run the product (scripts/generate_lora.py or the bundled web UI) against the attacker's checkpoint.
Technical Details
- Affected file/function: src/hyper_llm_modulator/utils/model_loading.py / get_tokenizer() (lines 46-66), reached via load_hypermod_checkpoint() and get_model_and_tokenizer()
- Vulnerable parameter: base_model_name_or_path (JSON field inside the checkpoint's adapter_config.json)
- Attack vector: Network
- Privileges required: None
- Trigger condition: the product overrides model_path with the field value and builds
chat_templates/{field}/chat_template.jinja without validation, then reads it with open().read();
multi-level ../ segments resolve the path outside the repository's trusted chat_templates/ tree
and the file content becomes the tokenizer's active chat template. The existence assert only
confirms the traversed target exists. The read target must be a directory that also contains
Hugging Face tokenizer files, since AutoTokenizer.from_pretrained() loads from the same
traversed path first.
Impact
- Confidentiality: Low (a chat_template.jinja file in an attacker-chosen local directory is read out of the trusted tree and absorbed into the tokenizer; in web UI and evaluation flows it is applied to subsequent conversations)
- Integrity: Low (the attacker-selected file replaces the trusted chat template for the whole run)
- Availability: None
CVSS v3.1
Score: 4.6 (Medium)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Timeline
- Discovered: 2026-10-16
- Vendor notified: [pending]
- Patch released: [pending]
- Public disclosure: [pending]
Countermeasure
Reject base_model_name_or_path values containing path separators or .. segments (or normalize the
value and require the result to stay inside the repository's chat_templates/ allowlist) in
get_tokenizer() at src/hyper_llm_modulator/utils/model_loading.py:47, before it is used at lines
52 and 59. |
|---|
| Source | ⚠️ https://github.com/SakanaAI/text-to-lora/issues/13 |
|---|
| User | Dem000 (UID 98389) |
|---|
| Submission | 10/17/2026 17:39 (1 month ago) |
|---|
| Moderation | 11/12/2026 09:00 (26 days later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 436295 [SakanaAI text-to-LoRA 0.0.1 Checkpoint Loading model_loading.py get_tokenizer base_model_name_or_path path traversal] |
|---|
| Points | 20 |
|---|