Actively exploited vulnerability

Realtek AP-Router SDK: memory corruption flaw under attack

CVE-2021-35395 · Realtek AP-Router SDK Buffer Overflow Vulnerability

Home network device9.8 critical

What is affected

Realtek AP-Router SDK is the kind of equipment many homes and small offices run for years without touching: a router, camera or storage box. Attackers scan the internet for exposed units, and a hijacked one can spy on traffic or be enrolled in a botnet without any visible sign.

Realtek AP-Router SDK HTTP web server boa contains a buffer overflow vulnerability due to unsafe copies of some overly long parameters submitted in the form that lead to denial-of-service (DoS).

CISA's description

What an attacker can do

This is a memory corruption flaw. It lets an attacker corrupt the program's memory by feeding it specially crafted content: a web page, a file or a network message. The result ranges from a crash to the attacker running their own code.

How it is reached
Over the internet or network
Access the attacker needs
No account needed
Does the victim have to do something?
No, works without the victim doing anything

What to do

  1. Check whether you own this device: look at the label on your router, camera or NAS, or open its admin page and note the model and firmware version.
  2. Install the latest firmware from the manufacturer's support page or the device's own update menu.
  3. If the manufacturer no longer releases updates for the model, replace it. An end-of-life device with an exploited flaw cannot be made safe.
  4. Turn off remote administration from the internet unless you truly need it, and change the default admin password.

Apply updates per vendor instructions.

Action required by CISA for US federal agencies

How urgent is it

CISA added this vulnerability to its Known Exploited Vulnerabilities catalogue on November 3, 2021, which means there is reliable evidence of attacks in the wild. US federal agencies must fix it by November 17, 2021, a deadline that has already passed. That deadline does not bind anyone else, but it shows how seriously the agency rates it.

The EPSS model estimates a 98% probability that this flaw will be exploited somewhere in the next 30 days. That is higher than 99.9% of all scored vulnerabilities.

Its CVSS severity score is 9.8 out of 10 (critical), as recorded in the US National Vulnerability Database.

Technical description

Realtek Jungle SDK version v2.x up to v3.4.14B provides an HTTP web server exposing a management interface that can be used to configure the access point. Two versions of this management interface exists: one based on Go-Ahead named webs and another based on Boa named boa. Both of them are affected by these vulnerabilities. Specifically, these binaries are vulnerable to the following issues: - stack buffer overflow in formRebootCheck due to unsafe copy of submit-url parameter - stack buffer overflow in formWsc due to unsafe copy of submit-url parameter - stack buffer overflow in formWlanMultipleAP due to unsafe copy of submit-url parameter - stack buffer overflow in formWlSiteSurvey due to unsafe copy of ifname parameter - stack buffer overflow in formStaticDHCP due to unsafe copy of hostname parameter - stack buffer overflow in formWsc due to unsafe copy of 'peerPin' parameter - arbitrary command execution in formSysCmd via the sysCmd parameter - arbitrary command injection in formWsc via the 'peerPin' parameter Exploitability of identified issues will differ based on what the end vendor/manufacturer did with the Realtek SDK webserver. Some vendors use it as-is, others add their own authentication implementation, some kept all the features from the server, some remove some of them, some inserted their own set of features. However, given that Realtek SDK implementation is full of insecure calls and that developers tends to re-use those examples in their custom code, any binary based on Realtek SDK webserver will probably contains its own set of issues on top of the Realtek ones (if kept). Successful exploitation of these issues allows remote attackers to gain arbitrary code execution on the device.

NIST National Vulnerability Database
5,442 members already hereReading, writing, commenting and voting. 0 verified · 167 joined this year