SMB Guest Access Permitted
The SMB server accepts guest logons, so anyone on the network can read, and sometimes change, any share or file that grants access to guests or to Everyone.
| Severity | Medium |
| CVSS 3.1 | 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N Open in the calculator |
| CVSS 4.0 | 6.9 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-306: Missing Authentication for Critical Function |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1078.001 Default Accounts, T1039 Data from Network Shared Drive, T1135 Network Share Discovery, T1080 Taint Shared Content |
| Category | Broken Access Control |
Description
The SMB server lets clients log on as a guest, either by naming the Guest account or by mapping failed or unknown logons to it, and then gives that session access to shares. Unlike a null session, which is limited to what the Anonymous Logon identity may do, a guest session runs as the Guest account, which on Windows is a member of the Everyone group, so it can open any share and file whose permissions allow Everyone or Guests. Anyone who can reach the SMB service can therefore read the data in shares open to guests, and can add, change or delete files where those shares are writable.
The impact depends on the data in the guest-accessible shares and on whether they are writable: writable guest shares are often used to plant malicious files, such as shortcuts that make visiting users authenticate to the attacker, or to replace documents and executable files that other people open. Microsoft also warns that clients which accept guest logons can be deceived into connecting to a malicious server without any prompt, which is why most current Windows editions refuse insecure guest logons by default; attack tools do not.
On Windows the Guest account is disabled by default, so guest access there usually comes from an enabled Guest account or the legacy Guest only sharing model. It is far more common on Samba servers configured with map to guest and guest ok shares, and on storage appliances, printers and other devices that offer guest access for convenience. It can be confirmed by connecting with the Guest account, or with an arbitrary user name and an empty password, using smbclient, smbmap or NetExec, which show the session as a guest and list the shares it can read or write.
Remediation
Remove guest access and replace it with authenticated access:
- On Windows, keep the Guest account disabled (Accounts: Guest account status in Security Options), set Network access: Sharing and security model for local accounts to Classic, and remove Guests and Everyone from the share and NTFS permissions of any share that holds more than public material, granting access to named groups instead.
- On Samba, set
map to guest = Never(the default) in the[global]section, and removeguest ok = yesandpublic = yesfrom share definitions. - On storage appliances, printers and other devices, turn off guest or anonymous access to shares in the management interface, and create accounts for the users and systems that need access.
- Keep insecure guest logons disabled on Windows clients with the Enable insecure guest logons policy under Computer Configuration, Administrative Templates, Network, Lanman Workstation, so that users cannot be steered to a malicious server.
Where a device can only offer guest access, isolate it on a restricted network segment and keep nothing sensitive on it. Confirm the fix by connecting with the Guest account and with an arbitrary user name and empty password, and checking that both are refused.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.