Heap buffer overflow in GNU coreutils unexpand via large tab stop values

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-56392?

CVE-2026-56392 is a vulnerability classified as Heap-based Buffer Overflow, affecting coreutils (affected versions: ≤ 9.11). This vulnerability is rated Low, with a CVSS score of 1.8. Current sources do not report this vulnerability as exploited.

Overview

Original source data

GNU coreutils unexpand is vulnerable to a heap-based buffer overflow due to an integer overflow during buffer allocation when processing large tab stop (-t) values. The multiplication used to calculate the allocation size can wrap around, resulting in an undersized buffer. When processing crafted input, subsequent writes exceed the allocated memory, leading to an out-of-bounds heap write. When running GNU coreutils unexpand with attacker-provided large tab stop (-t) arguments, this behavior leads to a crash and potentially achieve a heap write primitive depending on memory layout. This issue has been fixed in the commit b60a159fdc5bfcf9988d3a4cb6f53abe8ad5d35d

Affected products and scope

GNU coreutils, through the unexpand utility, in every release the advisory lists as affected up to and including the newest one it covers. The flaw sits in the handling of large tab stop values passed with -t; other coreutils utilities and other uses of unexpand are not described as affected. Because coreutils is packaged by many operating system distributions and shipped in appliances, the practical scope is any system whose coreutils package predates the fix.

Technical details

This is a heap-based buffer overflow (CWE-122): a write that runs past the end of a buffer allocated on the heap. unexpand computes a buffer size by multiplying values derived from the tab stop settings. With a very large -t value that multiplication overflows and wraps to a small number, so the allocation is undersized, and writes made afterwards while processing input run past the end of it. The record does not describe the exact allocation site, how the value is derived, or what data ends up being written.

Exploitability

Local. The attacker has to get unexpand invoked with a large tab stop value, and the record requires user interaction, meaning a person or an automated job must run the utility with those arguments. No privileges are needed. No exploitation in the wild is reported and no public exploit is known.

Technical impact

An attacker who controls the arguments gets a crash at minimum. Depending on memory layout, the out-of-bounds write may be usable as a heap write primitive, meaning the ability to corrupt heap memory in a controlled way, which is a step toward code execution. The record rates integrity and availability consequences as low, reports no confidentiality impact, and does not claim reliable code execution.

Business impact

unexpand is a small text utility, but it turns up in build scripts, log processing and data pipelines. Where such a job takes a tab stop value from an outside source, a crafted value can crash the process and take down the job or the script that depends on it. If the utility runs on data or arguments a remote party can shape, the same flaw can write past the allocated buffer, which in the worst case means code execution with the privileges of the account running the job. Confidentiality impact is described as none; the exposure is to the integrity and availability of the process and whatever work it is doing. Teams that only ever call unexpand with fixed arguments have little to worry about.

Remediation

Update GNU coreutils to a build that includes the upstream fix commit. Distributions that package coreutils carry the patch in their own updates, so applying the normal package update for coreutils is the effective action. If updating is not possible right away, do not pass untrusted values to unexpand's -t option; use a fixed tab stop setting or convert spaces to tabs another way.

Detection

Search scripts, build files, scheduled jobs and pipeline definitions for calls to unexpand that take a -t value from a variable, a file, or any source outside the script itself. Check process and job logs for segfaults or abnormal exits from unexpand, and check whether core dumps are enabled where it runs. Confirm the installed coreutils build includes the fix by comparing the package against your distribution's advisory.

Sources (10)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.