SNMP Default Community String

The SNMP agent answers to a default or easily guessed community string such as public, letting anyone who can reach it read the device's management information.

SeverityMedium
CVSS 3.15.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N Open in the calculator
CVSS 4.06.9 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-1392: Use of Default Credentials
OWASP Top 10A07:2025 Authentication Failures
MITRE ATT&CKT1602.001 SNMP (MIB Dump)
CategorySecurity Misconfiguration

Description

The device's SNMP agent accepts a default or easily guessed community string, most often public for read access and private for read and write access. In SNMP versions 1 and 2c the community string is the only credential, and many network devices, printers, servers and appliances ship with these values, or have them set during installation and never changed.

With a valid community string, anyone who can reach the agent can read its management information base (MIB), without authentication and with little chance of being noticed. Depending on the device, this exposes the system description and software version, network interfaces and addresses, routing and ARP tables, listening ports, running processes and installed software, and on Windows the local user accounts and shares, so a core router or a Windows server usually discloses far more than a printer. An attacker can use it to map the network, identify software versions with known vulnerabilities, learn user and service names, and find other systems and routes to target.

Some devices also expose configuration details or stored credentials through vendor-specific MIBs. Where the MIB discloses credentials, or the community also grants write access, the impact is considerably higher. The agent is usually reachable only from internal networks, but a device that answers SNMP from the internet can also be used in reflection attacks against third parties.

The issue is identified by sending requests with a list of common community strings, with tools such as onesixtyone or the Nmap snmp-brute script, and by reading the MIB with snmpwalk or the other Nmap SNMP scripts. Because SNMP uses UDP port 161, it is easily missed by port scans that cover TCP only. Where a default community also allows writing, that is reported as a writable community.

Remediation

Replace default community strings and restrict who can query the agent:

  • Disable SNMP on devices that are not monitored.
  • Where SNMP is needed, move to SNMPv3 with authentication and encryption (the authPriv security level), which replaces community strings with per-user credentials.
  • Where version 2c must remain for a time, remove the public and private communities and any other defaults, and replace them with a long, random, read-only community string that is unique to the environment.
  • Restrict SNMP to the management stations that poll it: on Cisco IOS, attach an access list to the community; in Net-SNMP, give the permitted source after the community in the rocommunity directive; on the Windows SNMP Service, use Accept SNMP packets from these hosts on the Security tab. Block UDP port 161 at network boundaries.
  • Limit what each community or user can read with SNMP views, so that only the objects the monitoring system needs are exposed.

Confirm the fix by repeating the community string guessing from an untrusted network segment and checking that no response is received.

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 trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Network Services Findings

Every Network Services finding