TestNG is vulnerable to Path Traversal
### Impact 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 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. ### Patches A 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. A 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. ### Workaround * Specify which tests to run when invoking TestNG by configuring them on the CLI or in the build tool controlling the run. * Do not run tests with untrusted JARs on the classpath, this includes pull requests on open source projects.
beschreibt (1)
Zugehörige CVEs.
| ID | Schweregrad | ausnutzbar | ||
|---|---|---|---|---|
| CVE-2022-4065US | high7.8 | Exploit | ||
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 fil… | ||||
Referenzen
Externe Belege — Patches, Meldungen, Analysen.
- https://github.com/cbeust/testngPACKAGE
- https://github.com/cbeust/testng/commit/9150736cd2c123a6a3b60e6193630859f9f0422bWEB
- https://github.com/cbeust/testng/pull/1596WEB
- https://github.com/cbeust/testng/pull/2806WEB
- https://github.com/cbeust/testng/releases/tag/7.7.0WEB
- https://github.com/cbeust/testng/releases/tag/7.7.1WEB
- https://github.com/testng-team/testng/pull/2899WEB
- https://github.com/testng-team/testng/releases/tag/7.5.1WEB
Advisories wie diese benennen die exponierten Produkte, die Angreifer auf Ihrer Angriffsfläche ins Visier nehmen. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.
Kostenloser Scan