Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

Managed Security Services

Expand your team’s capabilities and strengthen your security posture

Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

Penetration Testing

Subscription- or project-based testing, delivered by global experts

Database Security

Get ahead of database risk, protect data and exceed compliance requirements

Email Security & Management

Catch email threats others miss with layered security & maximum control

Co-Managed SOC (SIEM)

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Multiple Vulnerabilities in NETGEAR Routers

Last year I discovered multiple vulnerabilities in NETGEAR products. Now that these vulnerabilities have gone through the disclosure process and have been patched we can discuss the technical details.

TWSL2018-002: Password Recovery and File Access on Some Routers and Modem Routers

Trustwave SpiderLabs Advisory:

NETGEAR advisory:

Some routers allow arbitrary file reading from the device provided that the path to file is known. Proof-of-concept for Nighthawk X8 running firmware or earlier:

curl -d "id=304966648&next_file=cgi-bin/../../tmp/mnt/usb0/part1/README.txt"

The above will fetch README.txt file located on a USB thumb drive inserted into the router. Total of 17 products are affected. Specific models are listed in the Advisory notes.


TWSL2018-003: Finding 1: Post-Authentication Command Injection on Some Routers and Modem Routers

Trustwave SpiderLabs Advisory:

NETGEAR advisory:

This one affects six products per NETGEAR's advisory. What happens there is root level OS command execution via the device_name parameter on the lan.cgi page:

curl -d "action=Apply&device_name=A%22+%26%26+touch+%2Ftmp%2Fjimmers+%26%26+echo+%22B&sysLANIPAddr1=192&sysLANIPAddr2=168&sysLANIPAddr3=1&sysLANIPAddr4=1&sysLANSubnetMask1=255&sysLANSubnetMask2=255&sysLANSubnetMask3=255&sysLANSubnetMask4=0&rip_direction=1&sysRIPVersion=Disabled&dhcp_server=dhcp_server&sysPoolStartingAddr4=2&sysPoolFinishAddr4=254&select=-1&arp_enable=disable&ipmac_token=0&dev_name=R8500mge&lan_ipaddr="

Note that this attack requires authentication.


TWSL2018-003: Finding 2: Authentication Bypass on Some Routers or Modem Routers

NETGEAR advisory:

This also affects large set of products (17 total) and is trivial to exploit. Authentication is bypassed if "&genie=1" is found within the query string.


TWSL2018-003: Chained Attack: Command Injection on Some Routers and Modem Routers

NETGEAR advisory:

The same set of products is affected. This is a three-stage attack leveraging three separate issues: CSRF token recovery vulnerability (here's a tool to help: and the two findings in TWSL2018-003. As a result, any user connected to the router can run OS commands as root on the device without providing any credentials.


TWSL2018-004: Command Injection Vulnerability on D7000, EX6200v2, and Some Routers

Trustwave SpiderLabs Advisory: 

NETGEAR advisory:

Only 6 products are affected, this allows to run OS commands as root during short time window when WPS is activated. To prove, add the following line to the /etc/wpa_supplicant.conf file on your Linux box and join WPS initialed on the router.

(Nighthawk X4S):
device_name=MR" /sbin/reboot "

Observe the router reboot! This happens because internal code executed as part of WPS fails to sanitize hostnames.

Trustwave SpiderLabs has worked with NETGEAR through our responsible disclosure process to make sure that these vulnerabilities are addressed. We'd also like to thank NETGEAR for their responsive and communicative PSIRT team. It's obvious that their participation in bug bounties has helped them improve their internal process for addressing issues like these.

Please check the NETGEAR advisory pages to find the firmware that applies to your router model and make sure that your devices are patched if they are affected.

Latest SpiderLabs Blogs

The 2023 Retail Services Sector Threat Landscape: A Trustwave Threat Intelligence Briefing

The annual holiday shopping season is poised for a surge in spending, a fact well-known to retailers, consumers, and cybercriminals alike. The latter group, however, is poised to exploit any...

Read More

Pwning Electroencephalogram (EEG) Medical Devices by Default

Overall Analysis of Vulnerability Identification – Default Credentials Leading to Remote Code Execution During internal network testing, a document was discovered titled the “XL Security Site...

Read More

Hidden Data Exfiltration Using Time, Literally

I was looking at my watch last week and my attention was moved towards the seconds over at the right of the watch face, incrementing nicely along as you’d expect. Now, I don’t know if I’d just spent...

Read More