---
id: CVE-2026-68768
title: >-
  hashcat contains a heap-based buffer overflow (out-of-bounds write) in the
  outfile_write() function in src/outfile.c
summary: >-
  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 usernam…
severity: medium
cvss: 6.1
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H'
cwe:
  - CWE-120
published: '2026-08-22'
updated: '2026-09-24'
sourceUpdated: '2026-09-24T20:43:32.537'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-68768'
references:
  - url: 'https://github.com/hashcat/hashcat'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/hashcat/hashcat/blob/v7.1.2/src/outfile.c#L654-L668'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/hashcat/hashcat/commit/68f56a2d8712867a8520bf4dcf07f6145c23df89
    label: disclosure@vulncheck.com
  - url: 'https://github.com/hashcat/hashcat/issues/4740'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/hashcat-through-heap-buffer-overflow-in-outfile-write-via-oversized-username
    label: disclosure@vulncheck.com
  - url: 'https://github.com/hashcat/hashcat/issues/4740'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.00186
epssPercentile: 0.07251
ingestedAt: '2026-08-23T04:42:15.544Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
