Writable SNMP Community
An SNMP community with write access is accepted, so anyone who knows or guesses it can change the device's settings, disrupt it and, on some devices, take over its configuration.
| Severity | High |
| CVSS 3.1 | 8.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L Open in the calculator |
| CVSS 4.0 | 8.8 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-732: Incorrect Permission Assignment for Critical Resource |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1602.002 Network Device Configuration Dump, T1602.001 SNMP (MIB Dump) |
| Category | Broken Access Control |
Description
The device's SNMP agent accepts a community string with read and write access, so SNMP set requests made with it can change the values of writable objects in the device's management information base. The community is typically a default such as private, a guessable value or the same string as the read-only community. The objects that can be written depend on the device, but commonly include interface states and system settings and, on many network devices, vendor-specific objects that copy configuration files to or from a server.
An attacker who can reach the agent with the community string can therefore change the device's settings, for example shutting down network interfaces, altering routing or VLAN settings where these are writable, or changing the system's identity, which can disrupt the services that depend on the device. On many routers and switches, the configuration-copy objects let an attacker download the full configuration, including password hashes and keys, or upload a modified one, which gives complete control of the device, and on Linux and Unix hosts running Net-SNMP, write access can allow commands to be run through the agent's extension objects. The impact therefore ranges from disruption to full compromise of network infrastructure, depending on the device.
Write access is confirmed by setting an object to its current value, such as the system contact or location, which shows that writes are accepted without changing the device's behaviour. Community strings with write access are found with the same guessing tools used for read-only ones, such as onesixtyone and the Nmap snmp-brute script, followed by a test write with snmpset.
Remediation
Remove SNMP write access unless it is genuinely needed:
- Remove read-write communities from every device: on Cisco IOS, remove
snmp-server communityentries with theRWkeyword; in Net-SNMP, removerwcommunityand unneededrwuserlines; on the Windows SNMP Service, set the community rights to READ ONLY or remove the community; on other devices, use the vendor's settings. - Where a management platform needs write access, provide it only through an SNMPv3 user at the
authPrivlevel, limited by a view to the objects the platform must change and by an access list to the platform's addresses. - Change all community strings on the affected devices, since the write community may already be known, including any read-only community that used the same value.
- Review the configuration of affected devices for unauthorised changes, and change any passwords and keys held in configurations that could have been copied.
- Block UDP port 161 at network boundaries and restrict it to management networks.
Confirm the fix by attempting a harmless set request, such as writing the current system contact back, and checking that it is 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.