Executive brief
hashcat is a widely-used password recovery tool that processes hash files, potfiles, and wordlists to perform cryptographic attacks. A defect in the file parsing code allows a null byte to be written one position beyond the intended buffer boundary when processing specially-crafted input files with lines of exactly maximum buffer size, potentially causing heap corruption and process crashes.
Technical details
The vulnerability is an out-of-bounds heap write in the fgetl() function in src/filehandling.c. The fgetl() function fails to account for the terminating null byte when filling a buffer of exactly HCBUFSIZ_LARGE bytes, writing the null terminator one byte past the buffer's end. An attacker can trigger this by providing a hash file, potfile, or wordlist containing a line of exactly HCBUFSIZ_LARGE bytes. No special authentication is required—the vulnerability is triggered during normal file input processing. The heap write can corrupt adjacent memory structures, leading to denial of service or potentially code execution depending on heap layout and attacker control.
Affected products
- hashcat hashcat <UNKNOWN>
Timeline
- 2026-08-22: disclosed