Every CVE Search/ Get API key

GO-2026-5051

Out-of-bounds read and panic in ReadDir in github.com/cloudsoda/go-smb2 and github.com/hirochachacha/go-smb2

No scoreFix available

ReadDir and ReadDirPlus parse the QUERY_DIRECTORY SMB response by advancing through entries using the server-supplied NextEntryOffset field. The pre-fix code does not bound next against the remaining buffer before re-slicing, and the entry decoder IsInvalid check performs length arithmetic in int after narrowing from uint16.

A guest or anonymous directory listing against an attacker-controlled or man-in-the-middle SMB server crashes the Go client process with a runtime panic when the response contains an entry whose NextEntryOffset is larger than the remaining buffer, or whose declared FileNameLength produces a length that does not match the actual buffer size.

What each source reports

OSV No score

Out-of-bounds read and panic in ReadDir in github.com/cloudsoda/go-smb2 and github.com/hirochachacha/go-smb2

ReadDir and ReadDirPlus parse the QUERY_DIRECTORY SMB response by advancing through entries using the server-supplied NextEntryOffset field. The pre-fix code does not bound next against the remaining buffer before re-slicing, and the entry decoder IsInvalid check performs length arithmetic in int after narrowing from uint16.

A guest or anonymous directory listing against an attacker-controlled or man-in-the-middle SMB server crashes the Go client process with a runtime panic when the response contains an entry whose NextEntryOffset is larger than the remaining buffer, or whose declared FileNameLength produces a length that does not match the actual buffer size.

Record
GO-2026-5051
Updated
2026-11-02

Affected packages

Affected packages
PackageAffectedFixed
github.com/cloudsoda/go-smb2
Go
before 0.0.0-20260609183447-7b96c35f5f4b
0.0.0-20260609183447-7b96c35f5f4b
github.com/hirochachacha/go-smb2
Go
All versions None known

History

History
RecordedChangedSources
first indexedOSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

GO-2026-5051 is a vulnerability with no CVSS score yet in github.com/cloudsoda/go-smb2, published July 27, 2026. No source lists public exploit code. Fixed in github.com/cloudsoda/go-smb2 0.0.0-20260609183447-7b96c35f5f4b.

References

MoveEnter Open