Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-45301 Overview
CVE-2024-45301 affects Mintty, a terminal emulator used by Cygwin, MSYS, and Windows Subsystem for Linux (WSL). Versions 2.3.6 through 3.7.4 process specific escape sequences that cause the mintty process to access a file at an attacker-specified path. When that path points to a remote Server Message Block (SMB) share, Windows automatically negotiates authentication and leaks the user's NTLMv2 hash to the attacker. The flaw triggers simply by printing the sequence on the shell, for example through cat on a malicious file or output pasted into the terminal. Version 3.7.5 resolves the issue.
Critical Impact
Attackers can harvest NetNTLMv2 hashes from victims who view attacker-controlled content in Mintty, enabling offline cracking or Pass-the-Hash attacks.
Affected Products
- Mintty versions 2.3.6 through 3.7.4
- Cygwin, MSYS2, and WSL environments using the vulnerable Mintty builds
- Windows hosts where SMB outbound traffic is not blocked
Discovery Timeline
- 2025-11-12 - CVE-2024-45301 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-45301
Vulnerability Analysis
Mintty interprets a set of escape sequences that cause the terminal process to open or stat a file path controlled by the sequence payload. The vulnerability is classified as improper input validation [CWE-20] because Mintty does not restrict these paths to safe local locations. When the supplied path is a Universal Naming Convention (UNC) path such as \\attacker.example.com\share\file, the Windows file APIs transparently initiate an SMB session to the remote host. That SMB session performs NTLM authentication using the current user's credentials, exposing the NetNTLMv2 response to the attacker-controlled server.
The payload only needs to reach the terminal's output stream. Any workflow that prints untrusted data, including cat on a downloaded file, curl output, log tailing, or shared SSH session banners, can trigger the escape handler. Successful exploitation yields hashes suitable for offline cracking with tools such as Hashcat or for Pass-the-Hash relay attacks against services that accept NTLM.
Root Cause
Mintty's escape sequence parser passes attacker-supplied file paths to filesystem routines without validating that the path is local or safe. Because Windows resolves UNC paths through the SMB redirector, remote authentication occurs implicitly whenever the path references a network host.
Attack Vector
Exploitation requires user interaction: the victim must print or display the malicious sequence in a vulnerable Mintty session. The attack is network-adjacent in impact because the leaked credential material travels to a remote host chosen by the attacker. No prior authentication on the victim system is required beyond the user's own interactive session.
Technical details and the specific escape sequences involved are documented in the GitHub Security Advisory GHSA-jf4m-m6rv-p6c5.
Detection Methods for CVE-2024-45301
Indicators of Compromise
- Outbound SMB traffic (TCP 445 or 139) from workstations to unexpected external IP addresses or hostnames
- NTLM authentication events in Windows Security logs (Event ID 4624 / 4625) referencing non-domain remote hosts
- Mintty processes spawning file access to UNC paths that do not match known file servers
- Terminal session logs containing unusual OSC or DCS escape sequences preceding anomalous network activity
Detection Strategies
- Inspect proxy and firewall telemetry for SMB connections originating from Cygwin, MSYS2, or WSL user sessions
- Hunt for Mintty process network connections to hosts outside the organization's file-share inventory
- Correlate shell history (.bash_history) entries that read untrusted files with subsequent outbound SMB events
- Alert on NTLM challenge-response exchanges where the server is an untrusted or newly observed host
Monitoring Recommendations
- Enable Windows Advanced Audit Policy for logon and object access events on hosts running Mintty
- Forward SMB client telemetry and firewall deny logs to a centralized data lake for correlation
- Baseline normal file-share destinations per user and alert on first-seen remote SMB endpoints
- Monitor installed Mintty versions across endpoints and flag any build below 3.7.5
How to Mitigate CVE-2024-45301
Immediate Actions Required
- Upgrade Mintty to version 3.7.5 or later on all Cygwin, MSYS2, and WSL installations
- Block outbound TCP 445 and 139 at the perimeter firewall to prevent NTLM hash exfiltration
- Apply the Windows Group Policy setting "Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers" set to Deny or Audit
- Rotate credentials for any account that has displayed untrusted content in a vulnerable Mintty session
Patch Information
Mintty version 3.7.5 fixes the issue by restricting the escape sequences that could reference arbitrary paths. Users of Cygwin should run setup-x86_64.exe to pull the updated package; MSYS2 users should run pacman -Syu mintty. Review the upstream advisory GHSA-jf4m-m6rv-p6c5 for release notes.
Workarounds
- Avoid using cat, less, or similar commands on untrusted files inside vulnerable Mintty sessions until patched
- Enforce SMB signing and disable NTLM where feasible, requiring Kerberos for authentication
- Use host-based firewall rules to block SMB egress from workstations that have no legitimate need to reach external file shares
- Deploy LSA Protection and Credential Guard to reduce the usefulness of harvested hashes
# Verify Mintty version and update via MSYS2
mintty --version
pacman -Syu mintty
# Block outbound SMB on Windows hosts
New-NetFirewallRule -DisplayName "Block Outbound SMB 445" \
-Direction Outbound -Action Block \
-Protocol TCP -RemotePort 445
# Restrict outgoing NTLM via Group Policy registry key
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0" \
/v RestrictSendingNTLMTraffic /t REG_DWORD /d 2 /f
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

