
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-57632 is a heap out-of-bounds write (buffer overflow) vulnerability in libsmb2, a userspace SMB2/SMB3 client library. It affects libsmb2 versions 6.2 and earlier (all versions before the fix). When processing SMB2 chained PDUs via the NextCommand field, the library repeatedly calls smb2_add_iovector() to append to a fixed-size iovec array without checking the upper bound of v->niov against SMB2_MAX_VECTORS (256), enabling heap corruption. The vulnerability was discovered by JianLiang Zhao and published on September 25, 2025. It carries a CVSS v3.1 base score of 7.5 (High) (Feedly, CVE Gist).
The root cause is a missing bounds check in smb2_add_iovector() (located in lib/init.c) classified as CWE-120 (Buffer Copy without Checking Size of Input) and CWE-787 (Out-of-bounds Write). When a libsmb2 client processes a server response containing many chained SMB2 PDUs, each PDU causes an iovec to be appended to a fixed array of size 256; once v->niov reaches or exceeds SMB2_MAX_VECTORS, subsequent writes overflow the heap buffer. A secondary issue in lib/socket.c is that the SMB2_OPLOCK_BREAK message path bypasses message ID validation, making it easier for a malicious server to inject crafted chained responses without triggering normal sanity checks. No client credentials are required — the attack is triggered simply by the client connecting to a malicious SMB server (CVE Gist, Fix Commit).
Successful exploitation can cause memory corruption, application crashes (denial of service), and potentially arbitrary code execution on the client system running libsmb2. Because the vulnerability is triggered client-side upon connecting to a malicious server, any application or embedded device using libsmb2 (including those on PlayStation, Nintendo, Xbox, ESP32, Raspberry Pi Pico W, and other platforms) is at risk. The CVSS score reflects a confirmed high availability impact; confidentiality and integrity impacts are not formally scored but arbitrary code execution is acknowledged as a potential outcome (Feedly, CVE Gist).
A public proof-of-concept disclosure exists in the form of a GitHub Gist and a researcher blog post by the discoverer, JianLiang Zhao, describing how the vulnerability was found using AI-assisted research (CVE Gist). No evidence of in-the-wild exploitation or threat actor attribution has been reported. The vulnerability requires no authentication and no user interaction, making it remotely exploitable by any attacker who can position themselves as an SMB server that a libsmb2 client connects to. The EPSS score is 0.083% (low), and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Tenable Nessus detection (plugin 266116) is available (Tenable).
NextCommand field.NextCommand offsets), or leverage the SMB2_OPLOCK_BREAK path (which bypasses message ID validation) to inject additional chained responses without triggering normal checks.smb2_add_iovector() is called for each chained PDU without bounds checking, causing v->niov to exceed SMB2_MAX_VECTORS (256) and writing beyond the fixed-size iovec array on the heap.core.*) in working directories of applications using libsmb2 following SMB server connections.The vulnerability was fixed in the libsmb2 repository via two commits: commit 5e75eeb adds an upper-bound check in smb2_add_iovector() in lib/init.c, and commit 883e787 addresses the chained PDU parsing and OPLOCK_BREAK path issues in lib/socket.c. Users should update libsmb2 to the patched version available in the upstream repository. Debian has issued a stable update addressing this CVE (Debian Advisory). As a workaround where patching is not immediately possible, restrict libsmb2 clients from connecting to untrusted or unknown SMB servers, and use network-level controls to limit SMB traffic to trusted hosts only (Fix Commit, CVE Gist).
The vulnerability was discovered by JianLiang Zhao, who documented the research process in a blog post describing AI-assisted vulnerability discovery and PoC development (CVE Gist). Red Hat has acknowledged the CVE and is tracking it (Red Hat). Debian issued a stable point release in November 2025 that includes the fix (Debian). No significant broader media coverage or notable community controversy has been identified beyond standard vulnerability tracking.
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."