CVE-2026-137327 in mtoolsinfo

Summary

by MITRE • 11/26/2026

GNU mtools through 4.0.50 contains a divide-by-zero vulnerability that allows attackers to crash mtools commands by supplying a FAT image with a zero sectors-per-cluster byte. Attackers can craft a FAT image that, when opened with mdir, minfo or mtype, triggers a SIGFPE in calc_num_clus() on x86, causing denial of service.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 11/26/2026

The vulnerability identified within GNU mtools versions up to 4.0.50 represents a classic arithmetic error that leads to application instability and potential denial of service conditions. This flaw is rooted in the handling of File Allocation Table (FAT) image metadata, specifically concerning the sectors-per-cluster field which defines how many disk sectors are grouped into a single cluster for file storage operations. When mtools processes these images using commands such as mdir, minfo, or mtype, it relies on internal calculations to determine the total number of clusters available in the volume. The core technical flaw occurs within the calc_num_clus function where the software fails to validate that the sectors-per-cluster value is non-zero before performing division operations. In x86 architecture environments, dividing by zero triggers a Floating Point Exception signal known as SIGFPE, which abruptly terminates the process if not properly caught and handled by the application logic.

From an operational perspective, this vulnerability allows for remote or local denial of service attacks against systems relying on GNU mtools for FAT filesystem manipulation. An attacker can craft a maliciously formatted FAT image file where the sectors-per-cluster byte is explicitly set to zero. Upon opening this crafted image with any of the affected commands, the application will crash immediately due to the unhandled exception. This behavior disrupts administrative workflows and automated scripts that depend on mtools for disk imaging tasks, backup verification, or embedded system maintenance. The impact is strictly limited to availability as it results in a process termination rather than arbitrary code execution or data exfiltration, although repeated crashes could be leveraged in resource exhaustion attacks if the tool is part of an unattended service loop.

This issue aligns with Common Weakness Enumeration CWE-369 which describes divide-by-zero errors that lead to software instability. The exploitation vector involves providing malformed input data that violates expected format constraints, a pattern often associated with CWE-20 improper input validation. In the context of the MITRE ATT&CK framework, this vulnerability facilitates Denial of Service techniques where an adversary disrupts service availability by exploiting application logic flaws rather than network protocol vulnerabilities or buffer overflows. The attack requires no authentication if the tool is run interactively but could be exploited in automated pipelines that process untrusted disk images without prior sanitization checks.

Mitigation strategies primarily involve upgrading to GNU mtools version 4.0.51 or later where this arithmetic check has been implemented. For environments unable to upgrade immediately, input validation should be enforced at the ingestion layer before passing FAT images to mtools commands. Administrators can implement wrapper scripts that verify the integrity of disk image headers and reject files with invalid sector-per-cluster values prior execution. Additionally, running these tools within restricted containers or sandboxed environments limits the blast radius of potential crashes, ensuring that a single malformed file does not disrupt broader system operations. Regular auditing of third-party utility usage in automated pipelines is recommended to identify similar input handling weaknesses across other filesystem manipulation tools.

Responsible

VulnCheck

Reservation

11/26/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00350

KEV

no

Activities

low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!