Skip to content
RCE Write-up Intermediate

GL.iNET GL-MT300N-V2 Router Vulnerabilities and Hardware Teardown

The GL.iNET GL-MT300N-V2 router and its goodcloud.xyz management portal contained multiple vulnerabilities, including OS command injection in ping/traceroute parameters, arbitrary file read via the cloud gateway, user enumeration leaking PII, stored XSS in group fields, and weak password policies with no rate limiting. An attacker could execute commands, read files, take over accounts, and brute-force credentials.

Olivier Laflamme Follow

Published on boschko.ca

I've really enjoyed reversing cheap/weird IoT devices in my free time. In early May of 2022, I went on an Amazon/AliExpress shopping spree and purchased ~15 cheap IoT devices.

Olivier Laflamme (@olivier_boschko), on boschko.ca

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely improper input validation and missing security controls such as rate limiting and output encoding across multiple components.

Impact

An attacker could execute arbitrary commands, read sensitive files, enumerate users to obtain PII, take over accounts via stored XSS, and brute-force weak passwords, though some attacks required authentication or enterprise features.

What the attacker needed

Authenticated access to router or cloud; victim interaction for XSS; enterprise account for some attacks

The fix

The vendor fixed the issues in firmware version 3.215 and applied patches to the cloud gateway.

How it was found

  1. Discover hidden endpoints like /ping by inspecting router.js
  2. Send a POST request directly to the ping endpoint with a command separator in ping_addr
  3. Observe command output such as the working directory
  4. Use the same technique via the cloud gateway to read files
  5. Create a malicious group with XSS in company/description fields
  6. Invite a victim to the group to steal their session cookies

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes several security holes in a small router and its cloud management website. One hole lets someone who is logged in run commands on the router by typing special characters into a ping tool. Another lets attackers read files or take over accounts by exploiting weak login protections and a cross-site scripting bug.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Olivier Laflamme

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.