CVE-2021-20134 Path traversal in Quagga Services on D-Link DIR-2640 Routers

High 8.4 Published Updated

Authenticated attackers can exploit path traversal in Quagga services to overwrite scripts, achieving remote code execution and root access on D-Link DIR-2640 routers.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-20134?

CVE-2021-20134 is a high-severity path traversal vulnerability in Quagga Services on D-Link DIR-2640 Routers, published on 30 Dec 2021. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Quagga Services on D-Link DIR-2640 less than or equal to version 1.11B02 are affected by an absolute path traversal vulnerability that allows a remote, authenticated attacker to set an arbitrary file on the router's filesystem as the log file used by either Quagga service (zebra or ripd). Subsequent log messages will be appended to the file, prefixed by a timestamp and some logging metadata. Remote code execution can be achieved by using this vulnerability to append to a shell script on the router's filesystem, and then awaiting or triggering the execution of that script. A remote, unauthenticated root shell can easily be obtained on the device in this fashion.

Weakness: CWE-22

Which versions are affected by CVE-2021-20134?

It affects 1 product.

Products include Dlink Dir-2640-Us Firmware.

How do I fix CVE-2021-20134?

No fix has been published for CVE-2021-20134 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2021-20134 being exploited?

There is no known exploitation of CVE-2021-20134 in the wild and no public exploit code.

Sources

Also known as GHSA-v4h7-5mx9-q833.

Is CVE-2021-20134 in your software?

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

Check your SBOMs for free