Description
hashcat contains a heap-based buffer overflow (out-of-bounds write) in the outfile_write() function in src/outfile.c. When assembling output into a fixed-size buffer (HCBUFSIZ_LARGE, ~16 MB), the function sequentially appends the username, separator, hash, and plaintext via memcpy without validating that the accumulated length stays within the buffer capacity. When run with --username --show against a crafted hash file containing an oversized username that nearly fills the buffer, the total assembled output exceeds the buffer, causing a heap buffer overflow that can corrupt memory and crash the process.
Published: 2026-08-22
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Hashcat’s outfile_write() function assembles output into a fixed-size buffer without validating the cumulative length of the username, separator, hash, and plaintext. When run with the --username --show options on a hash file containing an oversized username that nearly fills the buffer, the function writes beyond the buffer boundary, corrupting memory and causing the process to crash. The overflow could also be leveraged by an attacker to manipulate memory contents, potentially leading to arbitrary code execution in contexts where hashcat runs with elevated privileges.

Affected Systems

The vulnerability affects hashcat version 7.1.2 and is specific to the outfile_write() implementation in src/outfile.c. No other versions are listed as affected in the available data.

Risk and Exploitability

With a CVSS score of 6.9, the vulnerability is considered moderate to high impact. The EPSS score is not available, and the flaw is not listed in the CISA KEV catalog. Exploitation requires local access to run hashcat and a crafted hash file with an oversized username; thus, the attack vector is local. An attacker could crash the tool or exploit the memory corruption to gain control over the process payload if additional vulnerabilities exist.

Generated by OpenCVE AI on August 22, 2026 at 15:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Install the latest hashcat release that contains the bug fix for outfile_write()
  • If the patch is not yet available, refrain from using the --username option with untrusted hash files
  • Validate or trim username lengths before feeding them to hashcat, or run the tool in a restricted environment where memory corruption cannot be abused

Generated by OpenCVE AI on August 22, 2026 at 15:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 22 Aug 2026 14:30:00 +0000

Type Values Removed Values Added
Description hashcat contains a heap-based buffer overflow (out-of-bounds write) in the outfile_write() function in src/outfile.c. When assembling output into a fixed-size buffer (HCBUFSIZ_LARGE, ~16 MB), the function sequentially appends the username, separator, hash, and plaintext via memcpy without validating that the accumulated length stays within the buffer capacity. When run with --username --show against a crafted hash file containing an oversized username that nearly fills the buffer, the total assembled output exceeds the buffer, causing a heap buffer overflow that can corrupt memory and crash the process.
Title hashcat through 7.1.2 Heap Buffer Overflow in outfile_write() via Oversized Username
First Time appeared Hashcat
Hashcat hashcat
Weaknesses CWE-120
CPEs cpe:2.3:a:hashcat:hashcat:*:*:*:*:*:*:*:*
Vendors & Products Hashcat
Hashcat hashcat
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H'}

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-22T14:12:44.241Z

Reserved: 2026-07-31T16:10:55.447Z

Link: CVE-2026-68768

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-22T15:16:20.903

Modified: 2026-08-22T15:16:20.903

Link: CVE-2026-68768

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T15:30:05Z

Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')