CVE Request 6: Path Traversal in read_log Module
-
Title: Path Traversal Vulnerability in
read_logModule Due to Unvalidated File Path -
Affected Component:
module/read_log.go,PrepareMethod -
Attack Vector: Malicious SQL query, such as
SELECT * FROM read_log('/proc/self/environ' AS path). -
Description: The
read_logfunction reads files based on user-supplied paths without validation, allowing attackers to view arbitrary server files. -
Vulnerability Type: Path Traversal (CWE-22)
-
Impact: May expose environment variables or other confidential runtime information, increasing the risk of further attacks.
-
Suggested Fix: Normalize the file path input using
filepath.Clean, ensure it’s absolute, and restrict access to a specific directory subtree.

浙公网安备 33010602011771号