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

Exploited in the wild Critical 9.8 Published Updated

Remote attackers can achieve arbitrary code execution on devices using Realtek Jungle SDK via command injection and buffer overflows in the web server.

Exploited in the wild
Since 3 Nov 2021
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-35395?

CVE-2021-35395 is a critical command injection vulnerability in n/a, published on 16 Aug 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Which versions are affected by CVE-2021-35395?

It affects 1 product.

Products include Realtek Rtl819x Jungle Software Development Kit.

How do I fix CVE-2021-35395?

No fix has been published for CVE-2021-35395 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 17 Nov 2021.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2021-35395 being exploited?

Yes. Attackers have exploited CVE-2021-35395 in the wild since at least 3 Nov 2021.

Public exploit code: 1 Nuclei template.

Sources

Also known as GHSA-qrv5-8v43-rrgf.

Is CVE-2021-35395 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free