CVE-2025-6773 in LightRAGinfo

Summary

by MITRE • 06/27/2025

A vulnerability was found in HKUDS LightRAG up to 1.3.8. It has been declared as critical. Affected by this vulnerability is the function upload_to_input_dir of the file lightrag/api/routers/document_routes.py of the component File Upload. The manipulation of the argument file.filename leads to path traversal. It is possible to launch the attack on the local host. The identifier of the patch is 60777d535b719631680bcf5d0969bdef79ca4eaf. It is recommended to apply a patch to fix this issue.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 07/03/2026

This critical vulnerability in HKUDS LightRAG version 1.3.8 represents a path traversal flaw that exposes the application to arbitrary file operations on the local host system. The vulnerability specifically resides in the upload_to_input_dir function within the document_routes.py file, which processes file uploads through the File Upload component. When an attacker manipulates the file.filename argument during the upload process, they can exploit the insufficient input validation to traverse the file system path and potentially execute malicious operations. This type of vulnerability falls under CWE-23 Path Traversal and is particularly dangerous because it allows attackers to access or modify files beyond the intended upload directory boundaries.

The operational impact of this vulnerability extends beyond simple data exposure, as it enables attackers to potentially overwrite critical system files, read sensitive configuration data, or establish persistent access points within the application environment. Attackers can leverage this weakness by crafting malicious filenames that contain directory traversal sequences such as "../" or similar path manipulation patterns. The vulnerability's local host attack vector means that successful exploitation could compromise the entire hosting system, especially if the application runs with elevated privileges. This represents a significant risk for organizations deploying LightRAG in production environments where file upload functionality is exposed to untrusted users.

The patch referenced by the identifier 60777d535b719631680bcf5d0969bdef79ca4eaf addresses this issue through proper input validation and sanitization of the filename parameter. Security practitioners should immediately apply this patch to protect their systems from potential exploitation. Organizations using LightRAG should also implement additional defensive measures including restrictive file upload policies, mandatory file type validation, and sandboxed execution environments for file processing operations. This vulnerability aligns with ATT&CK technique T1059 Command and Scripting Interpreter and T1203 Exploitation for Client Execution, as it provides an avenue for arbitrary code execution through manipulated file uploads. The fix should be validated through comprehensive penetration testing to ensure that all path traversal vectors have been eliminated from the application's file handling processes.

The broader implications of this vulnerability highlight the critical importance of secure input validation in web applications, particularly those handling user-supplied data. File upload functions represent common attack surfaces where insufficient sanitization can lead to devastating consequences. Organizations should conduct thorough security assessments of their applications' file handling mechanisms and implement defense-in-depth strategies including network segmentation, access controls, and regular security audits. This vulnerability demonstrates that even seemingly simple functionality like file uploads can contain critical security flaws when proper validation techniques are not implemented. The patch represents a necessary remediation step but should be complemented with ongoing monitoring and security awareness training for development teams to prevent similar issues in future releases.

Responsible

VulDB

Disclosure

06/27/2025

Moderation

accepted

CPE

ready

EPSS

0.00174

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!