Skip to content
Misconfiguration Write-up Intermediate

Bug: Cisco IOS SNMPv3 ACL Issues

Cisco IOS and IOS XE routers with SNMPv3 enabled and an ACL restricting access to a specific management IP still respond to SNMPv3 on the interface's network and broadcast addresses. An attacker scanning the whole subnet could discover and query SNMPv3 on those addresses, bypassing the intended ACL.

Gerry Gosselin Follow

Published on medium.com

Due to an acknowledged bug, a small sampling of Cisco IOS and IOS XE routers are exposing SNMPv3 despite configured ACL rules.

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

Cisco IOS and IOS XE routers run SNMP, and SNMPv3 is the version with the strongest security model. A network operator who enables SNMPv3 normally restricts who can reach udp/161 with an ACL, so that only the network management systems behind a corporate firewall can query the router. The router has an interface with an IP address assigned by the ISP and a LAN-side interface, and the ACL is written against the addresses the operator knows about.

The behaviour described here is that a small sampling of Cisco IOS and IOS XE routers expose SNMPv3 despite configured ACL rules. The researcher found that SNMPv3 was listening on an interface's network and broadcast addresses, not just on the interface's own IP address, and that this could expose SNMPv3 to the public Internet even where a typical ACL was in place.

Setup

The discovery came from a network discovery tool, Rumble. The researcher and a colleague were scanning with it in late 2019 to early 2020 and saw odd SNMPv3 results on Cisco IOS routers. They opened a support case with Rumble to understand why the tool was returning those results, and corresponded with Rumble's co-founder HD Moore. Rumble later featured an article about SNMPv3 listening when it was not explicitly configured, but the researcher notes that this was only part of the story.

For the prevalence testing, the Rumble team gave the researcher a Rumble sandbox account pre-loaded with scan data from over 917,000 IP addresses. The analysis was done with a Python script the researcher wrote, which parsed the test data and pulled out unique SNMP engine IDs.

No credentials, roles or specific IOS versions are given for the affected routers beyond the mix of IOS and IOS XE.

Finding it

On the researcher's own Cisco IOS router, SNMPv3 was listening even when only SNMPv2c was configured. The discovery tool showed SNMPv3 listening on an interface's network and broadcast addresses. The researcher also found evidence that SNMPv3 may be exposed to the public Internet despite typical ACL configurations.

The issue was disclosed to the Cisco Product Security Incident Response Team, which confirmed it in their lab. In September 2020 it was approved as bug ID CSCvo49242. Login is required for details about the bug, but a summary is available without login. The bug affects Cisco IOS and IOS XE devices. Cisco deemed it not to be a security bug and classified it as a configuration issue.

The scenario that makes the behaviour visible is simple. Take a net block of [redacted]/24. The Cisco IOS router has an interface with an IP address assigned by the ISP and a LAN-side interface with the IP address 192.0.2.1. SNMPv3 is enabled, but only the network management systems behind the corporate firewall should reach it. The corporate firewall NATs everything behind 192.0.2.5. The ACL on the IOS router allows SNMP (udp/161) to the router at [redacted] only from the firewall's NAT IP, 192.0.2.5.

Scanning [redacted] from the public Internet shows nothing: udp/161 does not appear, so the ACL looks effective. Scanning the whole [redacted]/24 from the public Internet shows SNMPv3 on the .0 and .255 addresses. Those are the network and broadcast addresses of the subnet, which the operator never configured as router addresses and therefore never thought to protect.

Exploitation

Step 1: Scan the router's own address

Scan [redacted] from the public Internet. udp/161 does not show up, because the ACL permits SNMP only from 192.0.2.5. This is the expected, safe result and it is what hides the problem.

Step 2: Scan the whole subnet

Scan the whole [redacted]/24 from the public Internet. SNMPv3 shows up on the .0 and .255 addresses, the network and broadcast addresses of the subnet, even though the ACL was written to allow SNMP only from the firewall's NAT IP to the router's own address.

Step 3: Work out what the exposure means

Because the router answers SNMPv3 on addresses the operator never configured, an ACL written against the router's own IP address does not cover them. The researcher's conclusion is that without knowledge of this bug, an operator would not add those addresses to the ACL, because they would assume the router is not listening on IPs they never configured.

Step 4: Measure prevalence in the scan data

The researcher used the Rumble sandbox data to look for routers exposing SNMP on their network and broadcast addresses and not exposing SNMP on their own IP address. The logic was that this pattern indicates a network operator attempting to block SNMP via ACL while the bug exposes it on the network and broadcast address.

The Python script parsed the test data and pulled out unique SNMP engine IDs. There were 1,519 unique Cisco routers in the sample set, a mix of IOS and IOS XE.

  1. Remove all routers with only one IP listening for SNMPv3.
  2. Remove all networks with only one IP listening for SNMPv3.
  3. What remains are routers with multiple IPs within the same network exposing the same SNMP engine ID. The sample was now 566 Cisco routers of the original 1,519, that is 566 unique routers exhibiting the SNMP network/broadcast bug.
  4. Filter the 566 for routers that have exactly two IP addresses with the same SNMP engine ID, where the two IP addresses land perfectly on a single subnet's network and broadcast address. The distance between the first and last IP was used to gauge the network size, and the first address and network size information were used to determine whether the first IP was a valid network address. The final count was 21 routers.

The script is published at https://github.com/gerrygosselin/rumble_snmpv3_bug_parser.

Root cause

The report describes an acknowledged bug in Cisco IOS and IOS XE: SNMPv3 listens on an interface's network and broadcast addresses in addition to the interface's own address. Separately, on the researcher's router SNMPv3 was listening even when only SNMPv2c was configured. The ACL permits SNMP only to the router's own IP from a specific source, yet SNMPv3 still answers on the network and broadcast addresses.

Cisco's position was that this is a configuration issue rather than a security bug. The report does not give a code-level explanation of why the router binds SNMPv3 to those addresses; it documents the observable behaviour and the conditions under which it appears.

Impact

Under the conditions described, SNMPv3 may be exposed on a router's network and broadcast addresses even when the operator has written an ACL to restrict SNMP to a trusted source. The report lists the consequences:

  • It exposes the size of networks.
  • It exposes SNMPv3 when it might otherwise be protected by an ACL.
  • The workaround is easy but not obvious unless you are specifically aware of and protecting against this bug.

In the sample, 21 of 1,519 routers were attempting to hide SNMPv3 via ACL and failing because of the bug. The other 1,498 routers had SNMPv3 exposed to the public Internet and likely no attempt was being made to restrict it via ACL. The researcher notes that SNMPv3 has pretty strong encryption but still would not want the port, nor the information it can disclose, available to all.

Fix

Cisco assessed the issue as a configuration issue. The workaround is to ACL the interface in a way that prevents SNMPv3 from being accessible, by including the interface's network and broadcast address in the ACL, or simply the whole network, [redacted]/24.

On patching, it appears that as of June 2022, two years since disclosure, only three versions of IOS XE include a fix for this behaviour:

  • Amsterdam-17.3.1
  • 17.3.1
  • 17.3(0.59)

Variants to test

  • Scan a subnet's network and broadcast addresses, not just the router's own IP, from outside the ACL's permitted source. A positive result is SNMPv3 answering on .0 and .255 while the router's own address stays closed.
  • Compare SNMP engine IDs across multiple IPs in the same subnet. A positive result is the same engine ID answering on more than one address, which indicates the same device listening beyond its configured address.
  • Check a router configured with only SNMPv2c for SNMPv3 listeners. A positive result is SNMPv3 responding even though it was never explicitly configured.

Final numbers

  • 917,000 IP addresses scanned
  • 1,519 routers exhibiting SNMPv3 EngineID info disclosure
  • 566 routers exhibiting SNMPv3 network/broadcast bug
  • 21 routers attempting to hide SNMPv3 via ACL and failing due to bug

First published June 25, 2022. Copyright © 2022 Gerry Gosselin.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A network engineer found that a small sampling of Cisco routers answer a particular kind of network question on addresses the owner never set up and never thought to protect. The owner had written a rule saying "only my trusted monitoring server may ask this question", and when you test the router's normal address the rule works. But if you test the other addresses in the same block of addresses, the router answers anyway. The engineer reported it to Cisco, Cisco confirmed it in their lab and gave it a bug ID, but decided it was a configuration mistake rather than a security flaw. The engineer then used a large set of internet scan data to measure how often this happens, and published the numbers.

This article walks through the whole story slowly, explaining each networking idea as it comes up. You only need to know how to use a computer and a browser.

Background ideas you will need

Before the story makes sense, here are the basic pieces. Each one is explained from zero.

What a router is

A router is a box that sits between networks and forwards traffic from one to the other. At home it is the device your internet provider gives you. In a company it is a bigger, more configurable device. Cisco is a large maker of these devices, and two of its product families are called IOS and IOS XE. Think of them as two generations of the same operating system that runs on the router, like two versions of Windows on a PC.

What an IP address is

Every device on a network has an IP address, a number that identifies it, a bit like a postal address. A typical one looks like [redacted]: four numbers separated by dots.

What a subnet is

Addresses are handed out in blocks called subnets. A subnet is written like [redacted]/24. The /24 says how big the block is: here, the first three numbers are fixed and the last one can vary, so the block covers [redacted] through [redacted], which is 256 addresses. Think of a street where the street name is fixed and the house numbers run from 0 to 255.

Network address and broadcast address

Inside every subnet, two addresses are special and are not normally given to a device:

  • The network address is the first one, here [redacted]. It is the name of the street itself.
  • The broadcast address is the last one, here [redacted]. A message sent there is meant to reach every device on the subnet at once, like shouting down the whole street.

Because nobody assigns these two to a machine, an administrator writing firewall rules tends to forget they exist.

What a port is

If the IP address is the building, the port is the flat number inside it. One machine can run many services at once, each on its own port. Ports are numbered, and some numbers are conventionally reserved for particular services. udp/161 means port 161 using a protocol called UDP. Port 161 is the standard port for SNMP.

What SNMP is

SNMP stands for Simple Network Management Protocol. It is the way monitoring software asks a router or switch questions like "how busy are you?" or "what is your name?". It is the router's customer service desk.

SNMP has gone through versions. SNMPv2c is an older version with weak security. SNMPv3 is the newest and has the strongest security model, including proper authentication and encryption. When an administrator turns on SNMPv3, they expect it to be the protected, modern option.

What an ACL is

An ACL, or Access Control List, is a list of allow and deny rules attached to a network interface. It is the bouncer at the door: "let in the monitoring server, turn everyone else away". A typical rule says: allow SNMP traffic to this router, but only from one specific trusted address.

What NAT is

NAT, Network Address Translation, is how a whole office can share one public address. The firewall rewrites outgoing traffic so it appears to come from a single address. In this story the corporate firewall makes everything behind it look like it comes from [redacted].

What a scan is

A scan is a program knocking on many addresses and ports to see which ones answer. Security teams use it to find exposed services. Attackers use it for the same reason. A tool called Rumble is a network discovery tool that does this kind of scanning.

What an SNMP engine ID is

Each SNMP service has an identifier called an engine ID. It is like a serial number for that SNMP instance. If the same engine ID answers on two different IP addresses, you know it is the same device behind both of them.

The discovery

In late 2019 and early 2020 the researcher and a colleague were scanning networks with Rumble. They noticed strange SNMPv3 results on Cisco IOS routers. Specifically, SNMPv3 appeared to be listening even when only SNMPv2c had been configured. That is like finding the modern secure entrance open on a building where only the old door was supposed to exist.

They opened a support case with Rumble to understand why the tool was reporting this. They corresponded with Rumble's co-founder HD Moore. Rumble later published an article about SNMPv3 listening when it was not explicitly configured, but the researcher says that article covered only part of the story.

On their own Cisco IOS router they found something more: SNMPv3 was listening on the interface's network and broadcast addresses, not just on the interface's own address. They also found evidence that SNMPv3 may be exposed to the public internet even when a typical ACL was in place.

Reporting it to Cisco

They disclosed the issue to the Cisco Product Security Incident Response Team, usually shortened to PSIRT. This is the group inside Cisco that handles reports of security problems in its products. Cisco confirmed the behaviour in their own lab.

In September 2020 the issue was approved as bug ID CSCvo49242. You can look up a summary of that bug without logging in, but the details require a login. The bug affects Cisco IOS and IOS XE devices.

Cisco's verdict was disappointing to the researcher: they decided it was not a security bug and treated it as a configuration issue. In other words, Cisco's position was that this was a configuration issue rather than a security bug.

The scenario that shows the problem

Here is the situation laid out step by step, because it is the heart of the whole report.

  1. You are a network engineer with the block [redacted]/24.
  2. Your Cisco IOS router has one interface facing your internet provider, with an address the provider gave you, and one interface facing your local network with the address [redacted].
  3. You have SNMPv3 turned on, but you only want your monitoring systems, which sit behind your corporate firewall, to be able to query it.
  4. Your corporate firewall uses NAT, so everything behind it appears to come from [redacted].
  5. You write an ACL on the router that allows SNMP on udp/161 to the router at [redacted], and only from [redacted].

Now test it from the outside. Scan [redacted] from the public internet and udp/161 does not appear. The rule is doing its job. Everything looks safe.

Then scan the whole block, [redacted]/24, from the public internet. SNMPv3 shows up on the .0 and .255 addresses. Those are the network and broadcast addresses of the subnet, the two addresses the engineer never configured as router addresses and therefore never thought to protect.

Why the workaround is not obvious

The workaround is to add the interface's network and broadcast address to the ACL, or simply allow and deny the whole block [redacted]/24 in one rule. That is easy once you know about the bug.

The researcher's point is that without knowing about it, nobody would do this. You assume a router only listens on the addresses you gave it. Protecting addresses you never assigned feels pointless, so the rule never gets written, and the hole stays open.

Measuring how common it is

The Rumble team gave the researcher a sandbox account loaded with scan data from more than 917,000 IP addresses. The goal was to find routers that expose SNMP on their network and broadcast addresses but not on their own IP address. That pattern is the fingerprint of an operator who tried to block SNMP with an ACL while the bug leaked it on the two special addresses.

The analysis was done with a Python script the researcher wrote, which parsed the scan data and pulled out unique SNMP engine IDs. The script is published at https://github.com/gerrygosselin/rumble_snmpv3_bug_parser.

The starting sample contained 1,519 unique Cisco routers, a mix of IOS and IOS XE. The filtering then went in stages:

  1. Remove all routers with only one IP listening for SNMPv3. A single address tells you nothing about the network and broadcast pattern.
  2. Remove all networks with only one IP listening for SNMPv3. Same reasoning at the network level.
  3. What remains are routers with multiple IPs in the same network exposing the same SNMP engine ID. The sample was now 566 Cisco routers out of the original 1,519. These are the routers showing the network and broadcast bug.
  4. Filter those 566 for routers with exactly two IP addresses sharing the same engine ID, where the two addresses land exactly on one subnet's network and broadcast address. The distance between the first and last IP was used to estimate the network size, and the first address plus the network size were used to check whether the first IP really was a valid network address. The final count was 21 routers.

What the numbers mean

Of 1,519 routers, 21 were clearly trying to hide SNMPv3 behind an ACL and failing because of the bug. The other 1,498 had SNMPv3 exposed to the public internet and likely no attempt was being made to restrict it via ACL.

The researcher's conclusion is that this is a security issue, even if not a very widespread one. The report lists three reasons:

  • It exposes the size of networks.
  • It exposes SNMPv3 when it might otherwise be protected by an ACL.
  • The workaround is easy but not obvious unless you are specifically aware of and protecting against this bug.

On the last point about the other 1,498 routers: SNMPv3 has pretty strong encryption, but the researcher still would not want the port, or the information it can disclose, available to everyone.

The final numbers

  • 917,000 IP addresses scanned
  • 1,519 routers exhibiting SNMPv3 EngineID info disclosure
  • 566 routers exhibiting SNMPv3 network/broadcast bug
  • 21 routers attempting to hide SNMPv3 via ACL and failing due to bug

Patching

As of June 2022, two years after disclosure, it appears that only three versions of IOS XE include a fix for this behaviour:

  • Amsterdam-17.3.1
  • 17.3.1
  • 17.3(0.59)

Things to test yourself

  • Scan a subnet's network and broadcast addresses, not just the router's own IP, from outside the ACL's permitted source. A positive result is SNMPv3 answering on .0 and .255 while the router's own address stays closed.
  • Compare SNMP engine IDs across multiple IPs in the same subnet. A positive result is the same engine ID answering on more than one address, which means the same device is listening beyond its configured address.
  • Check a router configured with only SNMPv2c for SNMPv3 listeners. A positive result is SNMPv3 responding even though it was never explicitly configured.

Glossary

  • ACL (Access Control List): a list of allow and deny rules attached to a network interface, deciding which traffic may pass.
  • Broadcast address: the last address in a subnet, used to send one message to every device on that subnet at once.
  • Cisco IOS / IOS XE: two generations of the operating system that runs on Cisco routers.
  • CSCvo49242: the bug ID Cisco assigned to this issue.
  • Engine ID: an identifier for an SNMP service instance, like a serial number; the same ID on two IP addresses means the same device.
  • IP address: the number that identifies a device on a network, written as four numbers separated by dots.
  • NAT (Network Address Translation): a technique where a firewall rewrites traffic so many devices appear to come from one public address.
  • Network address: the first address in a subnet, naming the subnet itself and not assigned to a device.
  • Port: a numbered channel inside a machine that a particular service listens on; udp/161 is the standard SNMP port.
  • PSIRT (Product Security Incident Response Team): the group inside a vendor that handles reports of security problems in its products.
  • Router: a device that forwards traffic between networks.
  • Rumble: a network discovery tool used to scan networks and find which services are listening.
  • Scan: a programmatic check of many addresses and ports to see which ones respond.
  • SNMP (Simple Network Management Protocol): the protocol monitoring software uses to ask network devices questions about their state.
  • SNMPv2c: an older SNMP version with weak security.
  • SNMPv3: the newest SNMP version, with the strongest security model, including authentication and encryption.
  • Subnet: a block of IP addresses sharing a fixed prefix, written like [redacted]/24.
  • UDP: a simple, connectionless transport protocol; SNMP uses it on port 161.

More from Cisco

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.