{"id":"CVE-2022-4065","aliases":["CVE-2022-4065","GHSA-rc2q-x9mf-w3vf"],"related":[],"kind":"vulnerability","state":"published","title":"cbeust testng XML File Parser JarFileUtils.java testngXmlExistsInJar path traversal","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"de","text":"In cbeust testng 7.5.0/7.6.0/7.6.1/7.7.0 wurde eine kritische Schwachstelle ausgemacht. Betroffen ist die Funktion testngXmlExistsInJar der Datei testng-core/src/main/java/org/testng/JarFileUtils.java der Komponente XML File Parser. Dank der Manipulation mit unbekannten Daten kann eine path traversal-Schwachstelle ausgenutzt werden. Der Angriff kann über das Netzwerk passieren. Ein Aktualisieren auf die Version 7.5.1 and 7.7.1 vermag dieses Problem zu lösen. Der Patch wird als 9150736cd2c123a6a3b60e6193630859f9f0422b bezeichnet. Als bestmögliche Massnahme wird das Einspielen eines Upgrades empfohlen.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nAffected 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`.\n\nThe manipulation leads to path traversal only for `.xml`, `.yaml` and `.yml` files by default. The attack implies running an unsafe test JAR. However since that JAR can also contain executable code itself, the path traversal is unlikely to be the main attack.\n\n### Patches\n\nA patch is available in [version 7.7.0](https://github.com/cbeust/testng/releases/tag/7.7.0) at commit 9150736cd2c123a6a3b60e6193630859f9f0422b. It is recommended to apply a patch to fix this issue. The patch was pushed into the master branch but no releases have yet been made with the patch included.\n\nA backport of the fix is available in [version 7.5.1]((https://github.com/cbeust/testng/releases/tag/7.5.1) for Java 8 projects.\n\n### Workaround\n\n* Specify which tests to run when invoking TestNG by configuring them on the CLI or in the build tool controlling the run.\n* Do not run tests with untrusted JARs on the classpath, this includes pull requests on open source projects.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se encontró una vulnerabilidad en cbeust testng 7.5.0/7.6.0/7.6.1/7.7.0. Ha sido declarado crítico. La función testngXmlExistsInJar del archivo testng-core/src/main/java/org/testng/JarFileUtils.java del componente XML File Parser es afectada por esta vulnerabilidad. La manipulación conduce al Path Traversal. El ataque se puede lanzar de forma remota. La actualización a las versiones 7.5.1 y 7.7.1 puede solucionar este problema. El nombre del parche es 9150736cd2c123a6a3b60e6193630859f9f0422b. Se recomienda actualizar el componente afectado. El identificador asociado de esta vulnerabilidad es VDB-214027.","source":"nvd"}],"published":"2022-11-19T00:00:00.000Z","modified":"2026-06-17T05:19:53.443Z","severity":{"scorer":"VulDB","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"VulDB","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","score":5.5,"rating":"MEDIUM"},{"scorer":"VulDB","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","score":5.5,"rating":"MEDIUM"},{"scorer":"VulDB","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"7.5.0","status":"affected"},{"version":"7.6.0","status":"affected"},{"version":"7.6.1","status":"affected"},{"version":"7.7.0","status":"affected"}],"vendor":"cbeust","product":"testng","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.13","status":"affected","fixed":"7.5.1"}],"ecosystem":"Maven","package":"org.testng:testng","purl":"pkg:maven/org.testng/testng","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.6.0","status":"affected","fixed":"7.7.0"}],"ecosystem":"Maven","package":"org.testng:testng","purl":"pkg:maven/org.testng/testng","source":"ghsa"},{"ranges":[],"vendor":"testng_project","product":"testng","cpe":"cpe:2.3:a:testng_project:testng:-:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://vuldb.com/?id.214027","tags":["technical-description","third-party-advisory","vdb-entry","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://vuldb.com/?ctiid.214027","tags":["permissions-required","signature","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cbeust/testng/pull/2806","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cbeust/testng/commit/9150736cd2c123a6a3b60e6193630859f9f0422b","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cbeust/testng/releases/tag/7.7.1","tags":["patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-4065","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/cbeust/testng/pull/1596","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/testng-team/testng/pull/2899","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cbeust/testng","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/cbeust/testng/releases/tag/7.7.0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/testng-team/testng/releases/tag/7.5.1","tags":["web"],"sources":["ghsa"]}],"credits":["VulDB GitHub Commit Analyzer"],"assigner":"VulDB","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-4065","url":"https://www.cve.org/CVERecord?id=CVE-2022-4065","licence":"CVE Terms of Use","modified":"2024-08-03T01:27:54.473Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rc2q-x9mf-w3vf","url":"https://github.com/advisories/GHSA-rc2q-x9mf-w3vf","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:24.506Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-4065","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-4065","licence":"Public domain","modified":"2026-06-17T05:19:53.443Z"}],"updatedAt":"2026-11-25T22:58:16.695Z","epss":{"score":0.01205,"percentile":0.6916,"date":"2026-12-01T12:00:22.000Z"}}