CVE-2022-30065
High · 7.8CVSS
7.8
EPSS
1.3%
Published
May 18, 2022
CISA due date
—
Cloudanix analysis
A flaw in a common command-line tool on many devices lets attackers crash systems or run harmful code when users handle specially crafted files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
Use-after-free in BusyBox awk applet's copyvar function when handling crafted awk patterns, enabling memory corruption that can result in denial of service or arbitrary code execution on the local system.
Why it matters to the business
Attackers can crash or take control of embedded devices and network equipment running BusyBox, causing operational downtime across industrial and IoT environments where the component is widely deployed.
How an attack unfolds
An attacker creates a malicious awk pattern designed to trigger the use-after-free condition in copyvar; when processed locally via the awk applet, the flaw allows memory manipulation leading to code execution. Public exploits are available and the vulnerability has existed since 2022.
How to fix it
Upgrade BusyBox to the latest stable release beyond 1.35.x, apply any available Siemens SCALANCE firmware updates, and restrict or disable the awk applet where feasible.
How to confirm the fix worked
Confirm BusyBox versions are updated across all systems, test awk processing with known-good inputs for stability, and review vendor advisories for affected Siemens products.
Typical attack path
- Craft a malicious awk pattern targeting the copyvar function
- Supply the pattern as input to the BusyBox awk applet
- Trigger the use-after-free memory corruption
- Leverage the corruption for denial of service or code execution
How to detect it
Search system and application logs for awk process crashes, unexpected memory errors, or repeated invocations with unusual patterns; review execution history on affected hosts.
What your security team should do
- Inventory and patch all BusyBox instances immediately due to available public exploits
- Apply Siemens firmware updates for SCALANCE devices
- Limit local execution of awk to trusted users only
- Monitor for new BusyBox releases and retest environments
The record
A use-after-free in Busybox 1.35-x's awk applet leads to denial of service and possibly code execution when processing a crafted awk pattern in the copyvar function.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.13 | busybox | 0 | 1.32.1-r9 |
| Alpine:v3.14 | busybox | 0 | 1.33.0-r8 |
| Alpine:v3.15 | busybox | 0 | 1.34.0-r6 |
| Alpine:v3.16 | busybox | 0 | 1.35.0-r15 |
| Alpine:v3.17 | busybox | 0 | 1.35.0-r17 |
| Alpine:v3.18 | busybox | 0 | 1.35.0-r17 |
| Alpine:v3.19 | busybox | 0 | 1.35.0-r17 |
| Alpine:v3.20 | busybox | 0 | 1.35.0-r17 |
| Alpine:v3.21 | busybox | 0 | 1.35.0-r17 |
| Alpine:v3.22 | busybox | 0 | 1.35.0-r17 |
| Chainguard | busybox | 0 | 1.35.0-r3 |
| Chainguard | busybox-full | 0 | 1.35.0-r3 |
| Debian:10 | busybox | 0 | No fix |
| Debian:11 | busybox | 0 | No fix |
| Debian:12 | busybox | 0 | No fix |
| Debian:13 | busybox | 0 | 1:1.36.1-1 |
| Mageia:8 | busybox | 0 | 1.34.1-1.2.mga8 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | busybox | 0 | 1.35.0-150000.4.17.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | busybox | 0 | 1.35.0-150400.3.8.1 |
| SUSE:Linux Enterprise Server 12 SP5 | busybox | 0 | 1.35.0-4.6.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | busybox | 0 | 1.35.0-4.6.2 |
| Wolfi | busybox | 0 | 1.35.0-r3 |
| Wolfi | busybox-full | 0 | 1.35.0-r3 |
| openSUSE:Leap 15.3 | busybox | 0 | 1.35.0-150000.4.17.1 |
| openSUSE:Leap 15.4 | busybox | 0 | 1.35.0-150400.3.8.1 |
| openSUSE:Leap 15.4 | busybox-links | 0 | 1.35.0-150400.4.3.14 |
| openSUSE:Tumbleweed | busybox | 0 | 1.35.0-9.1 |
Related vulnerabilities
- CVE-2017-16544 In the add_match function in libbb/lineedit.c in BusyBox through 1.27.2, the tab… Also affects busybox
- CVE-2017-15874 archival/libarchive/decompress_unlzma.c in BusyBox 1.27.2 has an Integer Underflow that… Also affects busybox
- CVE-2017-15873 The get_next_block function in archival/libarchive/decompress_bunzip2.c in BusyBox 1.27.2… Also affects busybox
- CVE-2025-60876 BusyBox wget thru 1.3.7 accepted raw CR (0x0D)/LF (0x0A) and other C0 control bytes in… Also affects busybox
- CVE-2024-58251 In netstat in BusyBox through 1.37.0, local users can launch of network application with… Also affects busybox
- CVE-2025-46394 In tar in BusyBox through 1.37.0, a TAR archive can have filenames hidden from a listing… Also affects busybox
- CVE-2014-9645 The add_probe function in modutils/modprobe.c in BusyBox before 1.23.0 allows local users… Also affects busybox
- CVE-2016-6301 The recv_and_process_client_pkt function in networking/ntpd.c in busybox allows remote… Also affects busybox