Snowflake (Go Driver), Insecure File Permissions, CVE-2023-XXXX (Medium)

Listen to this Post

The vulnerability in the Go Snowflake Driver (versions 1.7.0 to 1.13.2) stems from improper permission validation in the Easy Logging feature on Linux and macOS. The driver checks if the logging configuration file is writable only by its owner but fails to verify the file owner’s identity, introducing a TOCTOU (Time-of-Check to Time-of-Use) race condition. A local attacker with write access to the configuration file or its parent directory can exploit this flaw to modify logging settings, redirect logs to arbitrary locations, or escalate privileges by manipulating log data.

DailyCVE Form

Platform: Snowflake Go Driver
Version: 1.7.0 – 1.13.2
Vulnerability: TOCTOU race condition
Severity: Medium
Date: 2023-XX-XX

What Undercode Say:

Exploitation:

1. Attacker identifies writable Snowflake log config directory.

2. Race condition triggered during permission check.

3. Malicious config injected, redirecting logs.

while true; do echo "malicious_config" > /path/to/snowflake_log.conf; done

Mitigation:

1. Upgrade to Go Snowflake Driver v1.13.3+.

2. Restrict directory permissions:

chmod 700 /etc/snowflake_log.conf
chown root:root /etc/snowflake_log.conf

3. Monitor log file integrity:

inotifywait -m /path/to/log.conf -e modify

Detection:

package main
import (
"os"
"log"
)
func main() {
if _, err := os.Stat("/path/to/log.conf"); err == nil {
log.Println("Vulnerable config detected!")
}
}

References:

  • Snowflake Advisory: [bash]
  • CVE Details: [bash]
  • Patch Commit: [bash]

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top