GHSA-2rhq-96q8-4vjq

Suggest an improvement
Source
https://github.com/advisories/GHSA-2rhq-96q8-4vjq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/07/GHSA-2rhq-96q8-4vjq/GHSA-2rhq-96q8-4vjq.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-2rhq-96q8-4vjq
Aliases
Published
2025-07-07T15:30:37Z
Modified
2025-07-08T19:11:00.981535Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
LlamaIndex vulnerable to Path Traversal attack through its encode_image function
Details

A path traversal vulnerability exists in run-llama/llama_index versions 0.11.23 through 0.12.40, specifically within the encode_image function in generic_utils.py. This vulnerability allows an attacker to manipulate the image_path input to read arbitrary files on the server, including sensitive system files. The issue arises due to improper validation or sanitization of the file path, enabling path traversal sequences to access files outside the intended directory. The vulnerability is fixed in version 0.12.41.

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2025-07-08T18:26:03Z",
    "cwe_ids": [
        "CWE-29"
    ],
    "nvd_published_at": "2025-07-07T13:15:28Z",
    "severity": "HIGH"
}
References

Affected packages

PyPI / llama-index-core

Package

Name
llama-index-core
View open source insights on deps.dev
Purl
pkg:pypi/llama-index-core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.11.23
Fixed
0.12.41

Affected versions

0.*

0.11.23
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.12.6
0.12.7
0.12.8
0.12.9
0.12.10
0.12.10.post1
0.12.11
0.12.12
0.12.13
0.12.14
0.12.15
0.12.16
0.12.16.post1
0.12.17
0.12.18
0.12.19
0.12.20
0.12.21
0.12.22
0.12.23
0.12.23.post1
0.12.23.post2
0.12.24
0.12.24.post1
0.12.25
0.12.26
0.12.27a1
0.12.27a2
0.12.27a3
0.12.27
0.12.28
0.12.29
0.12.30
0.12.31
0.12.32
0.12.33
0.12.33.post1
0.12.34a1
0.12.34a2
0.12.34a3
0.12.34a4
0.12.34a5
0.12.34
0.12.34.post1
0.12.35
0.12.36
0.12.37
0.12.38
0.12.39
0.12.40