anyquery CVE Request 5: Path Traversal in read_toml Module

 

  • Title: Path Traversal Vulnerability in read_toml Module Due to Unvalidated File Path

  • Affected Componentmodule/read_toml.goPrepare Method

  • Attack Vector: Malicious SQL query, such as SELECT * FROM read_toml('/var/log/syslog' AS path).

  • Description: The read_toml function 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.

posted @ 2025-06-17 21:04  Aibot  阅读(11)  评论(0)    收藏  举报