{"answers":{"affected":"1 open source package ship an affected version, including gradle. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-35947 in the wild and no public exploit code.","fix":"Upgrade gradle to a fixed version for your release line: 7.6.2 or 8.2.0.","what":"CVE-2023-35947 is a medium-severity path traversal vulnerability in gradle, published on 30 Jun 2023. 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-2023-35947 and fix it if it is affected.\n\nWhat it is: CVE-2023-35947 is a medium-severity path traversal vulnerability in gradle, published on 30 Jun 2023. 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-2023-35947 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- gradle (Bitnami): affected all versions; fixed in 7.6.2, 8.2.0\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-2023-35947/ (Markdown: https://insights.sbomify.com/CVE-2023-35947/index.md)","id":"CVE-2023-35947","markdown":"https://insights.sbomify.com/CVE-2023-35947/index.md","name":"CVE-2023-35947","record":{"aliases":["BELL-CVE-2023-35947","BIT-gradle-2023-35947","DEBIAN-CVE-2023-35947","GHSA-84mw-qh6q-v842","SUSE-SU-2024:3923-1","UBUNTU-CVE-2023-35947"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Gradle build tool","requires_auth":"none","summary":"Attackers can overwrite files or read sensitive data via malicious Tar archives in Gradle, requiring an upgrade to secure the build process.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"gradle","vendor":"gradle"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Gradle is a build tool with a focus on build automation and support for multi-language development. In affected versions when unpacking Tar archives, Gradle did not check that files could be written outside of the unpack location. This could lead to important files being overwritten anywhere the Gradle process has write permissions. For a build reading Tar entries from a Tar archive, this issue could allow Gradle to disclose information from sensitive files through an arbitrary file read. To exploit this behavior, an attacker needs to either control the source of an archive already used by the build or modify the build to interact with a malicious archive. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Starting from these versions, Gradle will refuse to handle Tar archives which contain path traversal elements in a Tar entry name. Users are advised to upgrade. There are no known workarounds for this vulnerability.\n\n### Impact\n\nThis is a path traversal vulnerability when Gradle deals with Tar archives, often referenced as TarSlip, a variant of ZipSlip.\n\n* When unpacking Tar archives, Gradle did not check that files could be written outside of the unpack location. This could lead to important files being overwritten anywhere the Gradle process has write permissions.\n* For a build reading Tar entries from a Tar archive, this issue could allow Gradle to disclose information from sensitive files through an arbitrary file read.\n\nTo exploit this behavior, an attacker needs to either control the source of an archive already used by the build or modify the build to interact with a malicious archive. It is unlikely that this would go unnoticed.\n\nGradle uses Tar archives for its [Build Cache](https://docs.gradle.org/current/userguide/build_cache.html). These archives are safe when created by Gradle. But if an attacker had control of a remote build cache server, they could inject malicious build cache entries that leverage this vulnerability. This attack vector could also be exploited if a man-in-the-middle can be performed between the remote cache and the build.\n\n### Patches\n\nA fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Starting from these versions, Gradle will refuse to handle Tar archives which contain path traversal elements in a Tar entry name.\n\nIt is recommended that users upgrade to a patched version.\n\n### Workarounds\n\nThere is no workaround.\n\n* If your build deals with Tar archives that you do not fully trust, you need to inspect them to confirm they do not attempt to leverage this vulnerability.\n* If you use the Gradle remote build cache, make sure only trusted parties have write access to it and that connections to the remote cache are properly secured.\n\n### References\n\n* [CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')](https://cwe.mitre.org/data/definitions/22.html)\n* [Gradle Build Cache](https://docs.gradle.org/current/userguide/build_cache.html)\n* [ZipSlip](https://security.snyk.io/research/zip-slip-vulnerability)","ecosystems":["Bitnami","SUSE:Enterprise Storage 7.1","SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","SUSE:Linux Enterprise Module for Development Tools 15 SP5","SUSE:Linux Enterprise Module for Development Tools 15 SP6","SUSE:Linux Enterprise Server 15 SP2-LTSS","SUSE:Linux Enterprise Server 15 SP3-LTSS","SUSE:Linux Enterprise Server 15 SP4-LTSS","SUSE:Linux Enterprise Server for SAP Applications 15 SP2","SUSE:Linux Enterprise Server for SAP Applications 15 SP3","SUSE:Linux Enterprise Server for SAP Applications 15 SP4","openSUSE:Leap 15.5","openSUSE:Leap 15.6"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Path traversal vulnerabilities in handling of Tar archives in Gradle","id":"CVE-2023-35947","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"path_traversal","year":"2023"},"n_packages":16,"n_references":4,"next":{"headline":"Novu Open Redirect Vulnerability in Sign-In with GitHub Functionality","id":"CVE-2023-35948"},"packages":[{"ecosystem":"Bitnami","fixed":["7.6.2","8.2.0"],"introduced":["0","8.0.0"],"last_affected":[],"package":"gradle","purl":"pkg:bitnami/gradle","source":"BIT-gradle-2023-35947"},{"ecosystem":"SUSE:Enterprise Storage 7.1","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Enterprise%20Storage%207.1","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSS","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSS","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOS","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSS","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP5","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP5","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP6","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP6","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSS","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSS","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP4-LTSS","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSS","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP4","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/suse/gradle\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/opensuse/gradle\u0026distro=openSUSE%20Leap%2015.5","source":"SUSE-SU-2024:3923-1"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["4.4.1-150200.3.27.1"],"introduced":["0"],"last_affected":[],"package":"gradle","purl":"pkg:rpm/opensuse/gradle\u0026distro=openSUSE%20Leap%2015.6","source":"SUSE-SU-2024:3923-1"}],"prev":{"headline":"Dependency cache path traversal in Gradle","id":"CVE-2023-35946"},"products":["gradle"],"published":"2023-06-30","related":[{"cvss_score":9.8,"headline":"Information disclosure in n/a","id":"CVE-2019-15052","kev_date_added":null,"published":"2019-08-14"},{"cvss_score":9.8,"headline":"Deserialization in n/a","id":"CVE-2016-6199","kev_date_added":null,"published":"2017-02-07"},{"cvss_score":8.8,"headline":"Local privilege escalation through system temporary directory","id":"CVE-2021-29428","kev_date_added":null,"published":"2021-04-13"},{"cvss_score":8.6,"headline":"Gradle fails to disable repositories which can expose builds to malicious artifacts","id":"CVE-2026-22816","kev_date_added":null,"published":"2026-01-16"},{"cvss_score":8.6,"headline":"Gradle's failure to disable repositories failing to answer can expose builds to malicious artifacts","id":"CVE-2026-22865","kev_date_added":null,"published":"2026-01-16"},{"cvss_score":8.1,"headline":"Deserialization in n/a","id":"CVE-2021-41588","kev_date_added":null,"published":"2021-09-24"},{"cvss_score":8,"headline":"Repository content filters do not work in Settings pluginManagement","id":"CVE-2021-29427","kev_date_added":null,"published":"2021-04-13"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2025-02-13","vendors":["gradle"]},"summary":"Attackers can overwrite files or read sensitive data via malicious Tar archives in Gradle, requiring an upgrade to secure the build process.","url":"https://insights.sbomify.com/CVE-2023-35947/"}