| Título | Zefan-Cai R-KV commit 6715468b9872442be72e5c97322e4d9c9a2abf55 (main branch, 2026-07-20) Path Traversal |
|---|
| Descripción | A vulnerability was found in Zefan-Cai R-KV commit 6715468b9872442be72e5c97322e4d9c9a2abf55 and classified as high 7.1.
Affected is the _shard_files function of the FlashInfer weight loader component (FlashInfer/rkv/loader.py). The
manipulation of the weight_map argument of the model.safetensors.index.json file leads to a path traversal. It is
possible to launch the attack remotely. User interaction is required because a victim must load a crafted model
package with the documented FlashInferEngine(model_path) call.
Technical Details
- Affected file/function: FlashInfer/rkv/loader.py / _shard_files() and load_weights(), called from
FlashInferEngine.__init__ (FlashInfer/rkv/engine.py:58-62)
- Vulnerable parameter: weight_map shard values in model.safetensors.index.json
- Attack vector: Network (crafted package distributed via a model hub or file sharing)
- Privileges required: None
- Trigger condition: os.path.join(model_path, shard) joins attacker-controlled shard names onto the model directory
with no containment check; safetensors.safe_open then copies external tensor values into model parameters
(param.copy_). Relative ../ values escape the package and absolute values override the model directory entirely.
Impact
- Confidentiality: Low (no direct content disclosure; at most a coarse covert channel through model behavior)
- Integrity: High (silently loaded weights differ from the inspected package contents, defeating package-level
scanning and shard hash pinning)
- Availability: None
CVSS v3.1
Score: 7.1 (High)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
Timeline
- Discovered: 2026-10-21
- Vendor notified: [pending]
- Patch released: [pending]
- Public disclosure: [pending]
Countermeasure
Resolve each weight_map entry against the model directory and require the resolved path to stay inside it; reject
absolute paths and entries containing path separators (HuggingFace sharded checkpoints use bare shard file names). |
|---|
| Fuente | ⚠️ https://github.com/Zefan-Cai/R-KV/issues/65 |
|---|
| Usuario | Dem000 (UID 98389) |
|---|
| Sumisión | 2026-10-26 04:58 (hace 29 días) |
|---|
| Moderación | 2026-11-24 14:26 (29 days later) |
|---|
| Estado | Aceptado |
|---|
| Entrada de VulDB | 442892 [Zefan-Cai R-KV hasta 6715468b9872442be72e5c97322e4d9c9a2abf55 FlashInfer weight loader FlashInfer/rkv/loader.py _shard_files weight_map recorrido de directorios] |
|---|
| Puntos | 20 |
|---|