Skip to content
Memory corruption Advisory Advanced CVE-2019-5153

Moxa AWK-3131A iw_webs User Configuration Remote Code Execution Vulnerability

A stack-based buffer overflow in the iw_webs configuration parsing of Moxa AWK-3131A firmware version 1.13 allows a low-privilege authenticated attacker to overwrite the return address by importing a crafted configuration file with an overly long username, leading to remote code execution.

Jared Rittle Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

An exploitable remote code execution vulnerability exists in the iwwebs configuration parsing functionality of the Moxa AWK-3131A firmware version 1.13. A specially crafted user name entry can cause an overflow of an error message buffer, resulting in remote code execution.

Jared Rittle, on Cisco Talos

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The sprintf call that formats an error message with the user-supplied username does not perform bounds checking, allowing a stack buffer overflow.

Impact

An authenticated low-privilege attacker could execute arbitrary code on the device, potentially leading to full compromise.

What the attacker needed

Authentication as a low-privilege user; ability to import a configuration file

How it was found

  1. Authenticate to the device as a low-privilege user.
  2. Import a configuration file that contains a username of 0x110 bytes.
  3. The username fails validation and triggers an error message via sprintf.
  4. The oversized username overflows the stack buffer and overwrites the return address.
  5. When iw_websRedirect returns, execution jumps to the attacker-controlled address.

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 report has not been written yet. The Original tab links to the source.

This is a memory corruption bug in a wireless access point's web interface. When a user imports a configuration file with a very long username, the software copies that name into a fixed-size buffer without checking length, so it spills over and overwrites the return address that tells the processor where to go next. An attacker who is already logged in with low privileges can exploit this to run their own code on the device.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Jared Rittle

View all

64 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.