{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-38185 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2021-38185 is a high-severity vulnerability in n/a, published on 7 Aug 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-38185 and fix it if it is affected.\n\nWhat it is: CVE-2021-38185 is a high-severity vulnerability in n/a, published on 7 Aug 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-38185 in the wild and no public exploit code.\n\nAffected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-38185/ (Markdown: https://insights.sbomify.com/CVE-2021-38185/index.md)","id":"CVE-2021-38185","markdown":"https://insights.sbomify.com/CVE-2021-38185/index.md","name":"CVE-2021-38185","record":{"aliases":["ALSA-2022:1991","AZL-6357","CLEANSTART-2024-HF57565","DEBIAN-CVE-2021-38185","GHSA-pp74-ghrg-jwfh","MGASA-2021-0423","OESA-2021-1325","RHSA-2022:1991","RLSA-2022:1991","SUSE-RU-2021:2779-1","SUSE-RU-2021:2780-1","SUSE-SU-2021:14777-1","SUSE-SU-2021:14788-1","SUSE-SU-2021:2686-1","SUSE-SU-2021:2689-1","SUSE-SU-2021:2808-1","UBUNTU-CVE-2021-38185","USN-5064-1","USN-5064-2","USN-5064-3"],"analysis":{"component_type":"operating_system","fix_type":"patch","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"GNU cpio utility","requires_auth":"none","summary":"Attackers can execute arbitrary code via a crafted pattern file due to an integer overflow in GNU cpio, affecting Linux distributions.","user_interaction":"required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"cpio","vendor":"gnu"}],"cvss":{"score":7.8,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"description":"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 untrusted data.","ecosystems":["AlmaLinux:8","Red Hat:enterprise_linux:8::baseos","Rocky Linux:8","SUSE:Enterprise Storage 6","SUSE:HPE Helion OpenStack 8","SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","SUSE:Linux Enterprise High Performance Computing 15-ESPOS","SUSE:Linux Enterprise High Performance Computing 15-LTSS","SUSE:Linux Enterprise Micro 5.0","SUSE:Linux Enterprise Module for Basesystem 15 SP2","SUSE:Linux Enterprise Module for Basesystem 15 SP3","SUSE:Linux Enterprise Point of Sale 11 SP3","SUSE:Linux Enterprise Server 11 SP4-LTSS","SUSE:Linux Enterprise Server 12 SP2-BCL","SUSE:Linux Enterprise Server 12 SP3-BCL","SUSE:Linux Enterprise Server 12 SP3-LTSS","SUSE:Linux Enterprise Server 12 SP4-LTSS","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server 15 SP1-BCL","SUSE:Linux Enterprise Server 15 SP1-LTSS","SUSE:Linux Enterprise Server 15-LTSS","SUSE:Linux Enterprise Server for SAP Applications 12 SP3","SUSE:Linux Enterprise Server for SAP Applications 12 SP4","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 15","SUSE:Linux Enterprise Server for SAP Applications 15 SP1","SUSE:Manager Proxy 4.0","SUSE:Manager Retail Branch Server 4.0","SUSE:Manager Server 4.0","SUSE:OpenStack Cloud 8","SUSE:OpenStack Cloud 9","SUSE:OpenStack Cloud Crowbar 8","SUSE:OpenStack Cloud Crowbar 9"],"exploits":{"exploitdb":0,"first_seen":"2021-07-19","github_poc":1,"max_poc_stars":5,"metasploit":0,"nuclei":0,"refs":[{"date":"2021-07-19T20:10:13Z","kind":"github_poc","ref":"https://github.com/fangqyi/cpiopwn","stars":5,"title":"ACE poc exploit for glibc cpio 2.13 through mmap chunk metadata curruption (CVE-2021-38185)"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Integer overflow in n/a","id":"CVE-2021-38185","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"integer_overflow","year":"2021"},"n_packages":64,"n_references":5,"next":{"headline":"Cross-site Scripting in comrak","id":"CVE-2021-38186"},"packages":[{"ecosystem":"AlmaLinux:8","fixed":["2.12-11.el8"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/almalinux/cpio","source":"ALSA-2022:1991"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:2.12-11.el8"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/redhat/cpio","source":"RHSA-2022:1991"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:2.12-11.el8"],"introduced":["0"],"last_affected":[],"package":"cpio-debuginfo","purl":"pkg:rpm/redhat/cpio-debuginfo","source":"RHSA-2022:1991"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:2.12-11.el8"],"introduced":["0"],"last_affected":[],"package":"cpio-debugsource","purl":"pkg:rpm/redhat/cpio-debugsource","source":"RHSA-2022:1991"},{"ecosystem":"Rocky Linux:8","fixed":["0:2.12-11.el8"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/rocky-linux/cpio?distro=rocky-linux-8\u0026epoch=0","source":"RLSA-2022:1991"},{"ecosystem":"SUSE:Enterprise Storage 6","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Enterprise%20Storage%206","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["2.11-36.12.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-RU-2021:2779-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["2.11-36.15.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2021:2808-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["2.11-36.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2021:2686-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-ESPOS","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSS","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15-ESPOS","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOS","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15-LTSS","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSS","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.0","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.0","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP2","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP2","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP3","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise Point of Sale 11 SP3","fixed":["2.9-75.81.14.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Point%20of%20Sale%2011%20SP3","source":"SUSE-SU-2021:14788-1"},{"ecosystem":"SUSE:Linux Enterprise Point of Sale 11 SP3","fixed":["2.9-75.81.8.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Point%20of%20Sale%2011%20SP3","source":"SUSE-SU-2021:14777-1"},{"ecosystem":"SUSE:Linux Enterprise Server 11 SP4-LTSS","fixed":["2.9-75.81.14.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4-LTSS","source":"SUSE-SU-2021:14788-1"},{"ecosystem":"SUSE:Linux Enterprise Server 11 SP4-LTSS","fixed":["2.9-75.81.8.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4-LTSS","source":"SUSE-SU-2021:14777-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP2-BCL","fixed":["2.11-36.12.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCL","source":"SUSE-RU-2021:2779-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP2-BCL","fixed":["2.11-36.15.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCL","source":"SUSE-SU-2021:2808-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP2-BCL","fixed":["2.11-36.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCL","source":"SUSE-SU-2021:2686-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3-BCL","fixed":["2.11-36.12.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCL","source":"SUSE-RU-2021:2779-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3-BCL","fixed":["2.11-36.15.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCL","source":"SUSE-SU-2021:2808-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3-BCL","fixed":["2.11-36.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCL","source":"SUSE-SU-2021:2686-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3-LTSS","fixed":["2.11-36.12.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSS","source":"SUSE-RU-2021:2779-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3-LTSS","fixed":["2.11-36.15.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSS","source":"SUSE-SU-2021:2808-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP3-LTSS","fixed":["2.11-36.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSS","source":"SUSE-SU-2021:2686-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP4-LTSS","fixed":["2.11-36.12.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSS","source":"SUSE-RU-2021:2779-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP4-LTSS","fixed":["2.11-36.15.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSS","source":"SUSE-SU-2021:2808-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP4-LTSS","fixed":["2.11-36.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSS","source":"SUSE-SU-2021:2686-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["2.11-36.12.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-RU-2021:2779-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["2.11-36.15.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-SU-2021:2808-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["2.11-36.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-SU-2021:2686-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP1-BCL","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-BCL","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP1-LTSS","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSS","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15-LTSS","fixed":["2.12-3.9.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSS","source":"SUSE-RU-2021:2780-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP3","fixed":["2.11-36.12.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3","source":"SUSE-RU-2021:2779-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP3","fixed":["2.11-36.15.1"],"introduced":["0"],"last_affected":[],"package":"cpio","purl":"pkg:rpm/suse/cpio\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3","source":"SUSE-SU-2021:2808-1"}],"prev":{"headline":"Cross-site scripting in SAP NetWeaver","id":"CVE-2021-38183"},"products":["n/a"],"published":"2021-08-07","related":[{"cvss_score":7.2,"headline":"Path traversal in n/a","id":"CVE-2010-4226","kev_date_added":null,"published":"2014-02-06"},{"cvss_score":6.8,"headline":"Memory corruption in n/a","id":"CVE-2010-0624","kev_date_added":null,"published":"2010-03-12"},{"cvss_score":6.7,"headline":"Path traversal in cpio","id":"CVE-2019-14866","kev_date_added":null,"published":"2020-01-07"},{"cvss_score":5.3,"headline":"Cpio: extraction allows symlinks which enables remote command execution","id":"CVE-2023-7216","kev_date_added":null,"published":"2024-02-05"},{"cvss_score":4.9,"headline":"Path traversal in Debian cpio","id":"CVE-2023-7207","kev_date_added":null,"published":"2024-01-05"},{"cvss_score":4.6,"headline":"Path traversal in n/a","id":"CVE-2005-1229","kev_date_added":null,"published":"2005-04-22"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"BSD","name":"Rocky Linux","prefix":"RLSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-06-09","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code via a crafted pattern file due to an integer overflow in GNU cpio, affecting Linux distributions.","url":"https://insights.sbomify.com/CVE-2021-38185/"}