7.8
CWE
22
Advisory Published
Advisory Published
Updated

CVE-2022-4065: cbeust testng XML File Parser JarFileUtils.java testngXmlExistsInJar path traversal

First published: Sat Nov 19 2022(Updated: )

### 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.

Credit: cna@vuldb.com cna@vuldb.com cna@vuldb.com

Affected SoftwareAffected VersionHow to fix
maven/org.testng:testng>=7.6.0<7.7.0
7.7.0
maven/org.testng:testng>=6.13<7.5.1
7.5.1
Testng Project Testng

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203