Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

GO-2026-5051

UNSCORED

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

Mitigation

  • Upgrade github.com/cloudsoda/go-smb2 to 0.0.0-20260609183447-7b96c35f5f4b or later.

Who should check

  • Projects that depend on Go package github.com/cloudsoda/go-smb2 (< 0.0.0-20260609183447-7b96c35f5f4b)
  • Projects that depend on Go package github.com/hirochachacha/go-smb2

Vulnerability facts

Affected
github.com/cloudsoda/go-smb2 < 0.0.0-20260609183447-7b96c35f5f4b; github.com/hirochachacha/go-smb2
Fixed in
0.0.0-20260609183447-7b96c35f5f4b
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Unknown
CVSS
Not scored yet
Published
Modified

Description

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.

Affected and fixed versions

Package / productAffectedFixedSource
Go github.com/cloudsoda/go-smb2< 0.0.0-20260609183447-7b96c35f5f4b0.0.0-20260609183447-7b96c35f5f4bosv
Go github.com/hirochachacha/go-smb2——osv

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by GO-2026-5051. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/GO-2026-5051.md
Affected: github.com/cloudsoda/go-smb2 < 0.0.0-20260609183447-7b96c35f5f4b; github.com/hirochachacha/go-smb2
Fixed in: 0.0.0-20260609183447-7b96c35f5f4b

Steps:
1. Search this machine and project for github.com/cloudsoda/go-smb2 (Go), github.com/hirochachacha/go-smb2 (Go): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is GO-2026-5051 being exploited?

There is no confirmed exploitation: GO-2026-5051 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

How serious is GO-2026-5051?

It has no CVSS score yet. Unknown.

Which versions are affected by GO-2026-5051?

github.com/cloudsoda/go-smb2 < 0.0.0-20260609183447-7b96c35f5f4b; github.com/hirochachacha/go-smb2.

Is there a fix for GO-2026-5051?

Yes. Fixed in 0.0.0-20260609183447-7b96c35f5f4b. Upgrade github.com/cloudsoda/go-smb2 to 0.0.0-20260609183447-7b96c35f5f4b or later.

How do I check if I'm affected by GO-2026-5051?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors