CVE-2025-53358
Awaiting Analysis Awaiting Analysis - Queue
BaseFortify

Publication date: 2025-07-02

Last updated on: 2025-07-03

Assigner: GitHub, Inc.

Description
kotaemon is an open-source RAG-based tool for document comprehension. From versions 0.10.6 and prior, in libs/ktem/ktem/index/file/ui.py, the index_fn method accepts both URLs and local file paths without validation. The pipeline streams these paths directly and stores them, enabling attackers to traverse directories (e.g. ../../../../../.env) and exfiltrate sensitive files. This issue has been patched via commit 37cdc28, in version 0.10.7 which has not been made public at time of publication.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-02
Last Modified
2025-07-03
Generated
2026-05-07
AI Q&A
2025-07-02
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a path traversal flaw in the kotaemon tool, specifically in the index_fn method of the file ui.py. It improperly accepts both URLs and local file paths without validating them, allowing attackers to supply crafted paths with directory traversal sequences (like ../../../../.env). This enables attackers to access and exfiltrate sensitive files outside the intended directories by streaming and storing these paths directly. [1]


How can this vulnerability impact me? :

The vulnerability can lead to unauthorized access to sensitive files on the system where kotaemon is used. Attackers can exploit the path traversal to read confidential data, resulting in a high confidentiality loss. There is no impact on integrity or availability, but the exposure of sensitive information can have serious consequences. [1]


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by monitoring for attempts to use directory traversal sequences (e.g., ../../../../.env) in file path inputs to the kotaemon tool, especially in the index_fn method. You can check logs or network traffic for suspicious file path patterns that include '..' or other traversal indicators. Additionally, inspecting the usage of kotaemon versions prior to 0.10.7 can help identify vulnerable instances. Specific commands might include searching application logs or network captures for traversal patterns, for example using grep: `grep -r '\.\./' /path/to/kotaemon/logs` or monitoring network traffic for suspicious URL/file path parameters. However, no explicit detection commands are provided in the resources. [1]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include upgrading kotaemon to version 0.10.7 or later once it becomes publicly available, as this version contains the patch that adds validation to prevent path traversal. Until then, restrict access to the vulnerable functionality, validate and sanitize all file path inputs to the index_fn method to block directory traversal sequences, and monitor for suspicious activity. Applying the patch from commit 37cdc28 (once accessible) or implementing similar path validation logic can also mitigate the risk. Additionally, avoid processing untrusted ZIP files or URLs without proper validation. [2, 3]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart