anyquery CVE Request 5: Path Traversal in read_toml Module
-
Title: Path Traversal Vulnerability in
read_tomlModule Due to Unvalidated File Path -
Affected Component:
module/read_toml.go,PrepareMethod -
Attack Vector: Malicious SQL query, such as
SELECT * FROM read_toml('/var/log/syslog' AS path). -
Description: The
read_tomlfunction trusts user input for file paths without validation, leading to possible file disclosure. -
Vulnerability Type: Path Traversal (CWE-22)
-
Impact: Attackers can access log files or other important files that should not be available through SQL queries.
-
Suggested Fix: Clean the path with
filepath.Clean, resolve it to an absolute path, and verify it is within a trusted directory.

浙公网安备 33010602011771号