{"answers":{"affected":"4 open source packages ship an affected version, including org.testng:testng. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-4065 in the wild and no public exploit code.","fix":"Upgrade org.testng:testng to a fixed version for your release line: 7.5.1 or 7.7.0.","what":"CVE-2022-4065 is a medium-severity path traversal vulnerability in cbeust testng, published on 19 Nov 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-4065 and fix it if it is affected.\n\nWhat it is: CVE-2022-4065 is a medium-severity path traversal vulnerability in cbeust testng, published on 19 Nov 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-4065 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.testng:testng (Maven): affected from 6.13; fixed in 7.5.1\n- org.testng:testng (Maven): affected from 6.13; fixed in 7.5.1\n- org.testng:testng (Maven): affected from 7.6.0; fixed in 7.7.0\n- org.testng:testng (Maven): affected from 7.6.0; fixed in 7.7.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-2022-4065/ (Markdown: https://insights.sbomify.com/CVE-2022-4065/index.md)","id":"CVE-2022-4065","markdown":"https://insights.sbomify.com/CVE-2022-4065/index.md","name":"CVE-2022-4065","record":{"aliases":["GHSA-rc2q-x9mf-w3vf","MGASA-2023-0220","OESA-2024-1072","SUSE-SU-2023:1690-1","SUSE-SU-2024:2568-1","UBUNTU-CVE-2022-4065","openSUSE-SU-2024:12533-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Java testing library","requires_auth":"low_privilege","summary":"A path traversal vulnerability in TestNG allows remote attackers to read arbitrary files via crafted JAR files.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulDB","cpe":[{"product":"testng","vendor":"testng_project"}],"cvss":{"score":5.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"A vulnerability was found in cbeust testng 7.5.0/7.6.0/7.6.1/7.7.0. It has been declared as critical. Affected by this vulnerability is the function testngXmlExistsInJar of the file testng-core/src/main/java/org/testng/JarFileUtils.java of the component XML File Parser. The manipulation leads to path traversal. The attack can be launched remotely. Upgrading to version 7.5.1 and 7.7.1 is able to address this issue. The patch is named 9150736cd2c123a6a3b60e6193630859f9f0422b. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-214027.","ecosystems":["Maven","SUSE:Enterprise Storage 7","SUSE:Enterprise Storage 7.1","SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","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 SP4","SUSE:Linux Enterprise Module for Development Tools 15 SP5","SUSE:Linux Enterprise Module for Development Tools 15 SP6","SUSE:Linux Enterprise Module for Package Hub 15 SP6","SUSE:Linux Enterprise Real Time 15 SP3","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","SUSE:Manager Server Module 4.3","openSUSE:Leap 15.4","openSUSE:Leap 15.5","openSUSE:Leap 15.6"],"exploits":{"exploitdb":0,"first_seen":"2025-08-17","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-08-17T17:12:03Z","kind":"github_poc","ref":"https://github.com/shoucheng3/testng-team__testng_CVE-2022-4065_7-5","stars":0,"title":null}],"tier":"poc_unverified"},"has_fix":true,"headline":"cbeust testng XML File Parser JarFileUtils.java testngXmlExistsInJar path traversal","id":"CVE-2022-4065","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"path_traversal","year":"2022"},"n_packages":50,"n_references":5,"next":{"headline":"davidmoreno onion Log response.c onion_response_flush allocation of resources","id":"CVE-2022-4066"},"packages":[{"ecosystem":"Maven","fixed":["7.5.1"],"introduced":["6.13"],"last_affected":[],"package":"org.testng:testng","purl":null,"source":"GHSA-rc2q-x9mf-w3vf"},{"ecosystem":"Maven","fixed":["7.5.1"],"introduced":["6.13"],"last_affected":[],"package":"org.testng:testng","purl":"pkg:maven/org.testng/testng","source":"GHSA-rc2q-x9mf-w3vf"},{"ecosystem":"Maven","fixed":["7.7.0"],"introduced":["7.6.0"],"last_affected":[],"package":"org.testng:testng","purl":null,"source":"GHSA-rc2q-x9mf-w3vf"},{"ecosystem":"Maven","fixed":["7.7.0"],"introduced":["7.6.0"],"last_affected":[],"package":"org.testng:testng","purl":"pkg:maven/org.testng/testng","source":"GHSA-rc2q-x9mf-w3vf"},{"ecosystem":"SUSE:Enterprise Storage 7","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Enterprise%20Storage%207","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Enterprise Storage 7.1","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Enterprise%20Storage%207.1","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Enterprise Storage 7.1","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Enterprise%20Storage%207.1","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Enterprise Storage 7.1","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Enterprise%20Storage%207.1","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSS","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOS","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSS","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP4","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP4","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP5","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP5","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP5","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP5","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP6","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP6","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP6","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP6","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP6","fixed":["5.11.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"mockito","purl":"pkg:rpm/suse/mockito\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP6","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSS","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSS","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP4-LTSS","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP4-LTSS","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSS","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2","source":"SUSE-SU-2023:1690-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","fixed":["2.2-150200.3.15.1"],"introduced":["0"],"last_affected":[],"package":"snakeyaml","purl":"pkg:rpm/suse/snakeyaml\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","fixed":["7.10.1-150200.3.10.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3","source":"SUSE-SU-2024:2568-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","fixed":["7.4.0-150200.3.7.1"],"introduced":["0"],"last_affected":[],"package":"testng","purl":"pkg:rpm/suse/testng\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3","source":"SUSE-SU-2023:1690-1"}],"prev":{"headline":"Dalli Meta Protocol request_formatter.rb self.meta_set injection","id":"CVE-2022-4064"},"products":["testng"],"published":"2022-11-19","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["cbeust"]},"summary":"A path traversal vulnerability in TestNG allows remote attackers to read arbitrary files via crafted JAR files.","url":"https://insights.sbomify.com/CVE-2022-4065/"}