StackPatch is liveSee product

Back to CVE digest
CVE-2021-38185 · cross-distro fix matrix

CVE-2021-38185: GNU cpio through 2.13 allows attackers to execute arbitrary code via a crafted pattern file, because of a dstring.c ds_fgetstr integer overflow that triggers an out-of-bounds heap write. NOTE: it is unclear whether there are common cases where the pattern file, associated with the -E option, is untr

Affects 8 Linux releases across 8 (distro × package) combinations.

Fix per ecosystem

Each block below is a distro release where CVE-2021-38185 has a known fix. Run the listed command on that distro to remediate.

Debian bullseye

Source: Debian Security Tracker

  • cpio→ fixed in2.13+dfsg-7.1~deb11u1urgency: not yet assigned
    sudo apt-get install --only-upgrade -y cpio

Debian bookworm

Source: Debian Security Tracker

  • cpio→ fixed in2.13+dfsg-5urgency: not yet assigned
    sudo apt-get install --only-upgrade -y cpio

Debian trixie

Source: Debian Security Tracker

  • cpio→ fixed in2.13+dfsg-5urgency: not yet assigned
    sudo apt-get install --only-upgrade -y cpio

Alpine v3.20

Source: Alpine secdb

  • cpio→ fixed in2.13-r2
    apk update && apk add --upgrade cpio

Alpine v3.21

Source: Alpine secdb

  • cpio→ fixed in2.13-r2
    apk update && apk add --upgrade cpio

Alpine edge

Source: Alpine secdb

  • cpio→ fixed in2.13-r2
    apk update && apk add --upgrade cpio

Alpine v3.18

Source: Alpine secdb

  • cpio→ fixed in2.13-r2
    apk update && apk add --upgrade cpio

Alpine v3.19

Source: Alpine secdb

  • cpio→ fixed in2.13-r2
    apk update && apk add --upgrade cpio
Are YOU affected by CVE-2021-38185?

5-second check on your actual server. Reads /etc/os-release, uname -r, and the distro's package manager; matches against this same cross-source index live.

curl https://mindsparkstack.com/scan.sh | bash
Continuous monitoring beats manual checking

CVE-2021-38185dropped silently in your distro's update channel. Every new CVE is the same story. StackPatch runs the matcher hourly against all 5 sources and emails the exact remediation when something new applies to one of your servers. $99 lifetime, 50 founder seats, 30-day refund.

See StackPatch ($99 lifetime)