julien040/anyquery CVE Request 2: Path Traversal in read_json Module
CVE Request 2: Path Traversal in read_json Module
-
Title: Path Traversal Vulnerability in
read_jsonModule Due to Unvalidated File Path -
Affected Component:
module/read_json.go,PrepareMethod -
Attack Vector: Malicious SQL query, such as
SELECT * FROM read_json('/etc/passwd' AS path). -
Description: The
read_jsontable function uses file paths provided directly by SQL queries without validation, allowing path traversal to read arbitrary files on the server. -
Vulnerability Type: Path Traversal (CWE-22)
-
Impact: Attackers may read any file the
anyqueryprocess has access to, potentially exposing sensitive files and secrets. -
Suggested Fix: Use
filepath.Cleanand convert the path to an absolute path. Check that it resides within a trusted base directory before file access.

浙公网安备 33010602011771号