Security readout for executives and security teams
Plain-English summary
GNU cpio through 2.13 can be made to corrupt heap memory when it reads a specially crafted pattern file. Successful exploitation could allow code execution with the privileges of the user running cpio. Business risk depends heavily on whether automated workflows accept untrusted pattern files for cpio's -E option.
Executive priority
Treat as high priority where cpio handles external inputs in automation. For systems that never use untrusted -E pattern files, urgency is lower, but patching remains appropriate because the impact is full confidentiality, integrity, and availability compromise under the executing user.
Technical view
The flaw is an integer overflow in dstring.c ds_fgetstr that can lead to an out-of-bounds heap write. The CVSS vector is local, low complexity, no privileges required, and user interaction required. The CVE notes uncertainty about common real-world cases where the -E pattern file is untrusted.
Likely exposure
Exposure is most likely on systems running GNU cpio 2.13 or older where scripts, backup jobs, package workflows, or archive processing invoke cpio with -E using attacker-controlled or externally supplied pattern files.
Exploitation context
The source bundle references a public GitHub repository and GNU bug discussion, but KEV is false and no cited source states active exploitation. The attack is local and requires a victim workflow to process a crafted pattern file.
Researcher notes
The upstream fix is identified by GNU Savannah commit dd96882877721703e19272fe25034560b794061b. Product metadata in the bundle is incomplete, and the CVE itself warns that common untrusted -E use cases are unclear. Avoid assuming broad remote exposure without local workflow evidence.
Mitigation direction
- Upgrade GNU cpio using vendor packages or a release containing the upstream fix.
- Apply Debian LTS update DLA 3445-1 where applicable.
- Do not use cpio -E with untrusted pattern files.
- Restrict automation that accepts external pattern files before invoking cpio.
- Check current vendor guidance for supported fixed versions.
Validation and detection
- Inventory hosts and containers for GNU cpio versions through 2.13.
- Search scripts, CI jobs, and cron tasks for cpio invocations using -E.
- Confirm patched package versions from the operating system vendor.
- Review file-processing workflows for externally supplied pattern files.
- Prioritize validation on systems processing user-uploaded archives or build inputs.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-190: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupExecution behavior lookup
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
Open ATT&CK lookupCVE-2021-38185 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- High
- CVSS
- 7.8 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H1.85.9Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
7.8HighVector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/fangqyi/cpiopwnCVE reference
- https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00000.htmlCVE reference
- https://lists.gnu.org/archive/html/bug-cpio/2021-08/msg00002.htmlCVE reference
- https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=dd96882877721703e19272fe25034560b794061bCVE reference
- [debian-lts-announce] 20230604 [SECURITY] [DLA 3445-1] cpio security updateCVE reference · mailing-list
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
Integer Overflow or Wraparound
Integer Overflow or Wraparound represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
