Hacking

Critical RCE Bug Affects Millions of OpenWrt-based Network Devices

A security researcher disclosed technical details of a critical remote code execution flaw affecting the OpenWrt Linux-based operating system for network devices.

Earlier this year, security expert Guido Vranken from the software firm ForAllSecure, discovered a critical vulnerability in the OpenWrt Linux-based operating system for network devices.

The flaw tracked as CVE-2020-7982 is a critical remote code execution vulnerability affecting the operating system, which is a widely used Linux-based operating system for network devices such as routers and residential gateways.

The vulnerability exists in the OPKG package manager of OpenWrt, it is related to the way it performs integrity checking of downloaded packages using the SHA-256 checksums that are embedded in the signed repository index.

opgk is a utility to install or update the software on an OpenWRT system, it is comparable to apt on Debian-based systems.

The expert discovered that when an ‘ install’ command is executed on the target system, a remote attacker could exploit the vulnerability to intercept the communication of a targeted device to execute arbitrary code by tricking it into installing a malicious package or software update.

The successful exploitation of the flaw could allow a remote attacker to gain complete control over the vulnerable OpenWrt network device.

Vranken explained that when a checksum contains any leading spaces, the OPKG utility on the vulnerable versions of the operating system fails to check the integrity of the downloaded package and installs them.

“For exploitation it is required that the attacker serves (compromised) packages from a web server. The attacker must either be in a position to intercept and replace communication between the device and downloads.openwrt.org, or control the DNS server used by the device to make downloads.openwrt.org point to a web server controlled by the attacker.” reads a post published by the expert. “Attacks on a local network using packet spoofing or ARP cache poisoning might be possible, but this has not been tested.”

The expert ethically reported the flaw to the OpenWrt development team that acknowledged the flaw.

“Due to the fact that opkg on OpenWrt runs as root and has write access to the entire filesystem, arbitrary code could be injected by means of forged .ipk packages with a malicious payload,” states the OpenWrt team.

The vulnerability affects versions 18.06.0 to 18.06.6 and 19.07.0, as well as LEDE 17.01.0 to 17.01.7.

Vranken explained that to solve the issue, OpenWRT removed the space in the SHA256sum from the package list, but this solution is only partial remediation.

“As a stopgap solution, OpenWRT removed the space in the SHA256sum from the package list shortly after I reported the bug,” Vranken added. “However, this is not an adequate long-term solution because an attacker can simply provide an older package list that was signed by the OpenWRT maintainers.”

OpenWrt addresses the flaw with the release of the versions 18.06.7 and 19.07.1.

[adrotate banner=”9″] [adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – networking, hacking)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Fintech firm Figure disclosed data breach after employee phishing attack

Fintech firm Figure confirmed a data breach after hackers used social engineering to trick an…

18 hours ago

U.S. CISA adds a flaw in BeyondTrust RS and PRA to its Known Exploited Vulnerabilities catalog

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds a flaw in BeyondTrust RS and…

19 hours ago

Suspected Russian hackers deploy CANFAIL malware against Ukraine

A new alleged Russia-linked APT group targeted Ukrainian defense, government, and energy groups, with CANFAIL…

1 day ago

New threat actor UAT-9921 deploys VoidLink against enterprise sectors

A new threat actor, UAT-9921, uses the modular VoidLink framework to target technology and financial…

2 days ago

Attackers exploit BeyondTrust CVE-2026-1731 within hours of PoC release

Attackers quickly targeted BeyondTrust flaw CVE-2026-1731 after a PoC was released, enabling unauthenticated remote code…

2 days ago

Google: state-backed hackers exploit Gemini AI for cyber recon and attacks

Google says nation-state actors used Gemini AI for reconnaissance and attack support in cyber operations.…

2 days ago

This website uses cookies.