Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-8244: CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition in Go standard library path/filepath

0
Low
VulnerabilityCVE-2024-8244cvecve-2024-8244cwe-367
Published: Wed Aug 06 2025 (08/06/2025, 15:32:27 UTC)
Source: CVE Database V5
Vendor/Project: Go standard library
Product: path/filepath

Description

The filepath.Walk and filepath.WalkDir functions are documented as not following symbolic links, but both functions are susceptible to a TOCTOU (time of check/time of use) race condition where a portion of the path being walked is replaced with a symbolic link while the walk is in progress.

AI-Powered Analysis

AILast updated: 11/03/2025, 20:49:39 UTC

Technical Analysis

CVE-2024-8244 identifies a time-of-check to time-of-use (TOCTOU) race condition vulnerability in the Go programming language's standard library, specifically within the path/filepath package's Walk and WalkDir functions. These functions are designed to traverse directories without following symbolic links, which is a security measure to prevent unintended file system access. However, during the traversal process, an attacker can exploit a race condition by replacing a portion of the path with a symbolic link after the initial check but before the use, causing the functions to follow the symbolic link unexpectedly. This behavior violates the documented contract of these functions and can lead to security issues such as unauthorized file access or information disclosure. The vulnerability has a CVSS 3.1 base score of 3.7, reflecting low severity due to the high attack complexity and lack of privileges required. There are no known exploits in the wild, and no patches have been linked yet. The issue primarily affects applications written in Go that rely on filepath.Walk or WalkDir for directory traversal, especially when processing untrusted input or operating in multi-threaded or multi-process environments where the file system state can change during traversal. The root cause is the inherent race condition between the time the path is checked and the time it is used, a classic TOCTOU flaw categorized under CWE-367.

Potential Impact

For European organizations, the impact of this vulnerability is generally low but context-dependent. Organizations using Go in environments where directory traversal security is critical—such as web servers, file management systems, or containerized applications—may face risks of unauthorized file access or information leakage if an attacker can manipulate symbolic links during traversal. This could lead to exposure of sensitive data or bypass of security controls relying on the assumption that symbolic links are not followed. However, the high attack complexity and lack of known exploits reduce the immediate risk. The vulnerability does not affect system integrity or availability directly but could undermine confidentiality in specific scenarios. Organizations with automated systems that process untrusted file paths or rely on Go-based tooling for file operations should assess their exposure. The impact is more pronounced in environments with shared file systems or where attackers have some level of access to influence the file system state.

Mitigation Recommendations

1. Monitor the Go project for official patches addressing CVE-2024-8244 and apply them promptly once released. 2. Until patched, avoid using filepath.Walk and WalkDir on untrusted or user-controlled directory trees where symbolic link manipulation is possible. 3. Implement additional application-level checks to detect and prevent symbolic link traversal during directory walks, such as verifying file metadata before and after traversal steps. 4. Use alternative directory traversal methods or libraries that provide atomic or race-condition-resistant operations if available. 5. Restrict file system permissions to limit the ability of untrusted users or processes to create or modify symbolic links in directories processed by Go applications. 6. Employ containerization or sandboxing to isolate file system operations and reduce the attack surface. 7. Conduct code reviews and security testing focused on file system access patterns in Go applications to identify and remediate potential TOCTOU issues.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
Go
Date Reserved
2024-08-27T19:41:45.564Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69091538c28fd46ded7ba9f3

Added to database: 11/3/2025, 8:48:56 PM

Last enriched: 11/3/2025, 8:49:39 PM

Last updated: 11/5/2025, 2:06:20 PM

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats