Skip to content
Fencer Vulns
medium 5.5

CVE-2022-4065 json

cbeust testng XML File Parser JarFileUtils.java testngXmlExistsInJar path traversal

published 2022-11-19 3 y ago modified 2026-06-17 4 mo ago also EUVD-2022-7421 , GHSA-rc2q-x9mf-w3vf

cvss
5.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.0%
EPSS 1.0% chance of exploitation in 30 days, percentile 62%
public exploits
0
none known

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.

Patch / fix

  • maven org.testng:testng 7.5.1, 7.7.0
  • org.testng testng 7.5.1, 7.7.1
  • testng_project testng 7.5.1, 7.7.1
  • testng SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES for SAP 15 SP2 +12 more 7.10.1-150200.3.10.1
  • mockito SLE Module for Package Hub 15 SP6, openSUSE Leap 15.6, openSUSE Leap 15.5 5.11.0-150200.3.7.1
  • snakeyaml SLES for SAP 15 SP4, SLES for SAP 15 SP3, SLES for SAP 15 SP2 +13 more 2.2-150200.3.15.1
  • testng SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 7.4.0-150200.3.7.1

suse advisories SUSE-SU-2024:2568-1SUSE-SU-2023:1690-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-4065 updated cvss 7.0

testng: a path traversal in zip files

  • Red Hat Enterprise Linux 7 testng, testng-javadoc Red Hat Software Collections rh-maven36-testng, rh-maven36-testng-javadoc
    affected: no fix planned “Out of support scope”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.97% chance of exploitation in the next 30 days, higher than 62% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/cbeust/testng/pull/2806 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 5.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L
CNA 3.0 5.5 CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L
CNA 2.0 6.5 AV:N/AC:L/Au:S/C:P/I:P/A:P
GitHub 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven org.testng:testng
>=6.13, <7.5.1
>=7.6.0, <7.7.0
7.5.1
7.7.0

Affected products

  • cbeust testng

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added version information.